summaryrefslogtreecommitdiffhomepage
path: root/mixgtk/mixgtk_wm.c
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2019-01-12 19:31:20 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2020-10-18 17:47:53 +0100
commit1953e0b4b6a0317131df2de1b0f2c0483ad7690e (patch)
tree9d0aa83383af9a917863d0cac6f3ef4ced8b0219 /mixgtk/mixgtk_wm.c
parent1cfdfe433c8c8dcb40a0813528d7d0e0bb5ae2b6 (diff)
downloadmdk-1953e0b4b6a0317131df2de1b0f2c0483ad7690e.tar.gz
mdk-1953e0b4b6a0317131df2de1b0f2c0483ad7690e.tar.bz2
Mirgration to GTK+3: seemingly safe changes
Diffstat (limited to 'mixgtk/mixgtk_wm.c')
-rw-r--r--mixgtk/mixgtk_wm.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/mixgtk/mixgtk_wm.c b/mixgtk/mixgtk_wm.c
index 93f64ca..39d54cb 100644
--- a/mixgtk/mixgtk_wm.c
+++ b/mixgtk/mixgtk_wm.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- mixgtk_wm.c :
* Implementation of the functions declared in mixgtk_wm.h
* ------------------------------------------------------------------
- * Copyright (C) 2001, 2002, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2002, 2004, 2006, 2007, 2008, 2019 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -197,10 +197,10 @@ on_attach_toggled (GtkCheckMenuItem *item)
for (k = 0; k < INF_NO_; ++k)
if (item == infos_[k].menu) break;
g_return_if_fail (k < INF_NO_);
- if (item->active) mixgtk_wm_detach_window (k);
+ gboolean active = gtk_check_menu_item_get_active (item);
+ if (active) mixgtk_wm_detach_window (k);
else mixgtk_wm_attach_window (k);
- mixgtk_config_update (infos_[k].config_key,
- (item->active)? DETACH_YES_ : DETACH_NO_);
+ mixgtk_config_update (infos_[k].config_key, active? DETACH_YES_ : DETACH_NO_);
}
void
@@ -216,8 +216,8 @@ on_window_hide (GtkWidget *w)
void
on_show_toolbars_toggled (GtkCheckMenuItem *item)
{
- if (item->active != mixgtk_config_show_toolbars ())
- show_toolbars_ (item->active);
+ gboolean active = gtk_check_menu_item_get_active (item);
+ if (active != mixgtk_config_show_toolbars ()) show_toolbars_ (active);
}
void
@@ -426,7 +426,7 @@ init_dev_ (void)
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (page), devs);
+ gtk_container_add (GTK_CONTAINER (page), devs);
infos_[MIXGTK_DEVICES_WINDOW].widget = page;
@@ -664,6 +664,3 @@ update_attach_buttons_ (void)
gtk_tool_item_set_visible_horizontal (detach_button_, wants_detach);
gtk_tool_item_set_visible_vertical (detach_button_, wants_detach);
}
-
-
-