From b9fec9164fd2641a24aae283c0edd7768b0b537b Mon Sep 17 00:00:00 2001 From: Simon Steinbeiss Date: Tue, 24 May 2022 11:07:45 +0200 Subject: [PATCH] Revert "Get rid of GtkHeaderBar" This reverts commit fbb25a1ce65f16e160a489d2697ab7a0485d68de. The rationale is that we want to do a bugfix/maintenance release and this change targets Xfce 4.18. --- src/process-window.c | 11 +++- src/process-window.ui | 113 ++++++++++++++++++++++++------------------ 2 files changed, 76 insertions(+), 48 deletions(-) diff --git a/src/process-window.c b/src/process-window.c index 1e63e9a..125e585 100644 --- a/src/process-window.c +++ b/src/process-window.c @@ -234,6 +234,7 @@ static void xtm_process_window_init (XtmProcessWindow *window) { GtkWidget *button; + gboolean active; window->settings = xtm_settings_get_default (); window->channel = xfconf_channel_new (CHANNEL); @@ -260,6 +261,15 @@ xtm_process_window_init (XtmProcessWindow *window) G_CALLBACK (xwininfo_clicked_cb), window); window->filter_searchbar = GTK_WIDGET (gtk_builder_get_object (window->builder, "filter-searchbar")); + button = GTK_WIDGET (gtk_builder_get_object (window->builder, "button-show-filter")); + xfconf_g_property_bind (window->channel, SETTING_SHOW_FILTER, G_TYPE_BOOLEAN, + G_OBJECT (button), "active"); + active = xfconf_channel_get_bool (window->channel, SETTING_SHOW_FILTER, FALSE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), active); + gtk_revealer_set_reveal_child (GTK_REVEALER (gtk_bin_get_child (GTK_BIN (window->filter_searchbar))), active); + g_object_bind_property (G_OBJECT (gtk_bin_get_child (GTK_BIN (window->filter_searchbar))), "reveal-child", + G_OBJECT (button), "active", G_BINDING_BIDIRECTIONAL); + { GtkWidget *toolitem; guint refresh_rate; @@ -307,7 +317,6 @@ xtm_process_window_init (XtmProcessWindow *window) g_signal_connect (G_OBJECT(window->filter_entry), "icon-press", G_CALLBACK(filter_entry_icon_pressed_cb), NULL); g_signal_connect (G_OBJECT(window->filter_entry), "changed", G_CALLBACK(filter_entry_keyrelease_handler), window->treeview); gtk_widget_set_tooltip_text (window->filter_entry, _("Filter on process name")); - gtk_widget_grab_focus (window->filter_entry); } static void diff --git a/src/process-window.ui b/src/process-window.ui index 38f54b6..c7416f5 100644 --- a/src/process-window.ui +++ b/src/process-window.ui @@ -2,73 +2,92 @@ + + True + False + xc_crosshair + + + True + False + preferences-system-symbolic + + + True + False + edit-find-symbolic + False - Task Manager org.xfce.taskmanager - normal + + + True + False + Task Manager + False + True + + + True + True + True + Settings + image2 + + + + + True + True + True + Identify an open window by clicking on it. + image1 + + + 1 + + + + + True + True + True + Show/hide process filter + image3 + + + 2 + + + + True False vertical - + True False - False - 1 + True + True - + True True - True - Settings - preferences-system-symbolic + edit-find-symbolic + edit-clear + False + False - - - True - True - True - Identify an open window by clicking on it. - xc_crosshair - - - - - False - True - False - 2 - - - True - False - 1 - 0.4 - - - True - True - edit-find-symbolic - edit-clear - False - False - - - - - - - True - - False True + 0