summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2023-02-03 21:39:12 +0100
committerChristian Persch <chpe@src.gnome.org>2023-02-03 21:39:12 +0100
commitee3e72324e391bdec49b2b5cd637ae0e9d5d496f (patch)
tree6c29a52a4616b7b1dddf0122e3492ae42bbf56ed
parent6fb667a2d31227cb00b6f7dc57e3ce4cc59d3169 (diff)
downloadgnome-terminal-ee3e72324e391bdec49b2b5cd637ae0e9d5d496f.tar.gz
prefs: Fix default terminal check
Check whether the terminal's application ID is the default, not the preferences' application ID. This fixes the "Set as default" button sensitivity in the preferences.
-rw-r--r--src/terminal-app.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/terminal-app.cc b/src/terminal-app.cc
index 70933a68..b6740e3c 100644
--- a/src/terminal-app.cc
+++ b/src/terminal-app.cc
@@ -403,12 +403,14 @@ terminal_app_theme_variant_changed_cb (GSettings *settings,
static void
terminal_app_check_default(TerminalApp* app)
{
+#ifdef TERMINAL_SERVER
// Only do this for the default app ID
gs_free char* app_id = nullptr;
g_object_get(app, "application-id", &app_id, nullptr);
if (!_terminal_debug_on(TERMINAL_DEBUG_DEFAULT) &&
!g_str_equal(app_id, TERMINAL_APPLICATION_ID))
return;
+#endif /* TERMINAL_SERVER */
// Check whether gnome-terminal is the default terminal
// as per XDG-Terminal-Exec.