summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2020-10-19 00:06:51 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2020-10-19 00:06:51 +0100
commit09670630c062d52a6926ef58cea90c1ec8b42c0f (patch)
treeb6a6deb5f34bad0e22f639001b34447e824cac59
parent85f0f06ef4a86b42a16ec6971a170e02ca4fff1a (diff)
downloadmdk-09670630c062d52a6926ef58cea90c1ec8b42c0f.tar.gz
mdk-09670630c062d52a6926ef58cea90c1ec8b42c0f.tar.bz2
attach/detach buttons
-rw-r--r--mixgtk/mixgtk.glade10
-rw-r--r--mixgtk/mixgtk_wm.c14
2 files changed, 12 insertions, 12 deletions
diff --git a/mixgtk/mixgtk.glade b/mixgtk/mixgtk.glade
index f245c16..35e0147 100644
--- a/mixgtk/mixgtk.glade
+++ b/mixgtk/mixgtk.glade
@@ -569,7 +569,7 @@ Free Software Foundation, Inc&lt;/small&gt;</property>
</packing>
</child>
<child>
- <object class="GtkToolButton" id="attach_button2">
+ <object class="GtkToolButton" id="attach_button_dev">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="is_important">True</property>
@@ -1674,7 +1674,7 @@ Free Software Foundation, Inc&lt;/small&gt;</property>
<property name="is_important">True</property>
<property name="label" translatable="yes">Attach</property>
<property name="use_underline">True</property>
- <property name="stock_id">gtk-dnd</property>
+ <property name="stock_id">gtk-revert-to-saved</property>
<signal name="clicked" handler="on_attach_all_clicked" swapped="no"/>
</object>
<packing>
@@ -1893,7 +1893,7 @@ Free Software Foundation, Inc&lt;/small&gt;</property>
</packing>
</child>
<child>
- <object class="GtkToolButton" id="attach_button1">
+ <object class="GtkToolButton" id="attach_button_mixal">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="is_important">True</property>
@@ -1965,7 +1965,7 @@ Free Software Foundation, Inc&lt;/small&gt;</property>
<property name="is_important">True</property>
<property name="label" translatable="yes">Font</property>
<property name="use_underline">True</property>
- <property name="stock_id">gtk-disconnect</property>
+ <property name="stock_id">gtk-select-font</property>
<signal name="clicked" handler="on_mix_font_activate" swapped="no"/>
</object>
<packing>
@@ -1984,7 +1984,7 @@ Free Software Foundation, Inc&lt;/small&gt;</property>
</packing>
</child>
<child>
- <object class="GtkToolButton" id="attach_button3">
+ <object class="GtkToolButton" id="attach_button_mixvm">
<property name="name">attach_button</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/mixgtk/mixgtk_wm.c b/mixgtk/mixgtk_wm.c
index f1cf8d7..b442eb9 100644
--- a/mixgtk/mixgtk_wm.c
+++ b/mixgtk/mixgtk_wm.c
@@ -41,6 +41,7 @@ typedef struct window_info_t_
const gchar *menu_name;
const gchar *config_key;
const gchar *toolbar_name;
+ const gchar *attach_button;
gboolean detached;
void (*detach) (void);
void (*attach) (void);
@@ -91,13 +92,13 @@ static void on_nb_switch_ (GtkNotebook *notebook, GtkWidget *page,
static window_info_t_ infos_[] = {
{MIXGTK_MIXVM_DIALOG, NULL, NULL,
- "detach_vm", "MIX.detach", "mixvm_toolbar",
+ "detach_vm", "MIX.detach", "mixvm_toolbar", "attach_button_mixvm",
FALSE, mixvm_detach_, mixvm_attach_},
{MIXGTK_MIXAL_DIALOG, NULL, NULL,
- "detach_source", "MIXAL.detach", "mixal_toolbar",
+ "detach_source", "MIXAL.detach", "mixal_toolbar", "attach_button_mixal",
FALSE, mixal_detach_, mixal_attach_},
{MIXGTK_DEVICES_DIALOG, NULL, NULL,
- "detach_dev", "Devices.detach", "dev_toolbar",
+ "detach_dev", "Devices.detach", "dev_toolbar", "attach_button_dev",
FALSE, dev_detach_, dev_attach_}
};
@@ -313,8 +314,7 @@ init_signals_ (void)
G_OBJECT (mixgtk_widget_factory_get_dialog (infos_[k].dialog));
GObject *button =
- G_OBJECT (mixgtk_widget_factory_get (infos_[k].dialog,
- MIXGTK_WIDGET_ATTACH_BUTTON));
+ G_OBJECT (mixgtk_widget_factory_get_by_name (infos_[k].attach_button));
g_assert (dialog != NULL);
g_assert (button != NULL);
@@ -573,8 +573,7 @@ mixvm_attach_ (void)
static void
reparent_ (GtkWidget *widget, GtkWidget *parent)
{
- gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (widget)),
- widget);
+ gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (widget)), widget);
gtk_container_add (GTK_CONTAINER (parent), widget);
}
@@ -636,6 +635,7 @@ dev_detach_ (void)
reparent_ (infos_[MIXGTK_DEVICES_WINDOW].widget, GTK_WIDGET (dev_container_));
}
+
static void
on_nb_switch_ (GtkNotebook *notebook, GtkWidget *page,
guint page_num, gpointer user_data)