summaryrefslogtreecommitdiff
path: root/capplets/appearance/appearance-ui.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2018-03-15 14:53:50 -0400
committerlukefromdc <[email protected]>2018-03-16 13:55:05 -0400
commit48b4fc3407816ddcab6e2bd20b063b6de9746e25 (patch)
tree09bd8464301c05e3b239eb50140e3b7260377705 /capplets/appearance/appearance-ui.c
parent9888c14a69484aecdb48bfea6bcd562b178e9ff1 (diff)
downloadmate-control-center-48b4fc3407816ddcab6e2bd20b063b6de9746e25.tar.bz2
mate-control-center-48b4fc3407816ddcab6e2bd20b063b6de9746e25.tar.xz
Add auto-detect toggle switch
Currently if a user changes the DPI, there is no way to reset it back to the auto-detected value from Xserver (which we store as 0 in gsettings). Adding this toggle solves that issue. I also removed a deprecated [GtkHandleBox](https://developer.gnome.org/gtk3/stable/GtkHandleBox.html) and all its associated code.
Diffstat (limited to 'capplets/appearance/appearance-ui.c')
-rw-r--r--capplets/appearance/appearance-ui.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/capplets/appearance/appearance-ui.c b/capplets/appearance/appearance-ui.c
index 00427e96..86c61fdb 100644
--- a/capplets/appearance/appearance-ui.c
+++ b/capplets/appearance/appearance-ui.c
@@ -22,34 +22,6 @@
#include "appearance.h"
#include "stdio.h"
-
-static void
-show_handlebar (AppearanceData *data, gboolean show)
-{
- GtkWidget *handlebox = appearance_capplet_get_widget (data, "toolbar_handlebox");
- GtkWidget *toolbar = appearance_capplet_get_widget (data, "toolbar_toolbar");
- GtkWidget *align = appearance_capplet_get_widget (data, "toolbar_align");
-
- g_object_ref (handlebox);
- g_object_ref (toolbar);
-
- if (gtk_bin_get_child (GTK_BIN (align)))
- gtk_container_remove (GTK_CONTAINER (align), gtk_bin_get_child (GTK_BIN (align)));
-
- if (gtk_bin_get_child (GTK_BIN (handlebox)))
- gtk_container_remove (GTK_CONTAINER (handlebox), gtk_bin_get_child (GTK_BIN (handlebox)));
-
- if (show) {
- gtk_container_add (GTK_CONTAINER (align), handlebox);
- gtk_container_add (GTK_CONTAINER (handlebox), toolbar);
- g_object_unref (handlebox);
- } else {
- gtk_container_add (GTK_CONTAINER (align), toolbar);
- }
-
- g_object_unref (toolbar);
-}
-
static void
set_have_icons (AppearanceData *data, gboolean value)
{
@@ -94,14 +66,6 @@ menus_have_icons_cb (GSettings *settings,
set_have_icons (data, g_settings_get_boolean (settings, key));
}
-static void
-toolbar_detachable_cb (GSettings *settings,
- gchar *key,
- AppearanceData *data)
-{
- show_handlebar (data, g_settings_get_boolean (settings, key));
-}
-
/** GUI Callbacks **/
static gint
@@ -140,16 +104,4 @@ ui_init (AppearanceData *data)
set_have_icons (data,
g_settings_get_boolean (data->interface_settings,
MENU_ICONS_KEY));
-
- g_signal_connect (appearance_capplet_get_widget (data, "toolbar_handlebox"),
- "button_press_event",
- (GCallback) button_press_block_cb, NULL);
-
- show_handlebar (data,
- g_settings_get_boolean (data->interface_settings,
- TOOLBAR_DETACHABLE_KEY));
-
- /* no ui for detachable toolbars */
- g_signal_connect (data->interface_settings,
- "changed::" TOOLBAR_DETACHABLE_KEY, (GCallback) toolbar_detachable_cb, data);
}