index 1de46ebe448e4f48eaafee408ba52a956e5fed55..434d171852485c51f73674da8fb260d3bac4f497 100644 (file)
<accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image432">
+ <widget class="GtkImage" id="image504">
<property name="visible">True</property>
<property name="stock">gtk-open</property>
<property name="icon_size">1</property>
<accelerator key="E" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image433">
+ <widget class="GtkImage" id="image505">
<property name="visible">True</property>
<property name="stock">gtk-justify-fill</property>
<property name="icon_size">1</property>
<accelerator key="B" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image434">
+ <widget class="GtkImage" id="image506">
<property name="visible">True</property>
<property name="stock">gtk-execute</property>
<property name="icon_size">1</property>
<accelerator key="Q" modifiers="GDK_CONTROL_MASK | GDK_MOD1_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image435">
+ <widget class="GtkImage" id="image507">
<property name="visible">True</property>
<property name="stock">gtk-quit</property>
<property name="icon_size">1</property>
<accelerator key="R" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image436">
+ <widget class="GtkImage" id="image508">
<property name="visible">True</property>
<property name="stock">gtk-go-forward</property>
<property name="icon_size">1</property>
<accelerator key="N" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image437">
+ <widget class="GtkImage" id="image509">
<property name="visible">True</property>
<property name="stock">gtk-goto-last</property>
<property name="icon_size">1</property>
<accelerator key="C" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image438">
+ <widget class="GtkImage" id="image510">
<property name="visible">True</property>
<property name="stock">gtk-clear</property>
<property name="icon_size">1</property>
<accelerator key="Y" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image439">
+ <widget class="GtkImage" id="image511">
<property name="visible">True</property>
<property name="stock">gtk-index</property>
<property name="icon_size">1</property>
<widget class="GtkMenu" id="view1_menu">
<child>
- <widget class="GtkCheckMenuItem" id="show_toolbars">
+ <widget class="GtkImageMenuItem" id="toolbars1">
<property name="visible">True</property>
<property name="label" translatable="yes">_Toolbars</property>
<property name="use_underline">True</property>
- <property name="active">False</property>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image512">
+ <property name="visible">True</property>
+ <property name="stock">gtk-preferences</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenu" id="toolbars1_menu">
+
+ <child>
+ <widget class="GtkCheckMenuItem" id="show_toolbars">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Show Toolbars</property>
+ <property name="use_underline">True</property>
+ <property name="active">False</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="toolbars_style">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Style</property>
+ <property name="use_underline">True</property>
+
+ <child>
+ <widget class="GtkMenu" id="toolbars_style_menu">
+
+ <child>
+ <widget class="GtkRadioMenuItem" id="tb_style_icons">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Show only icons in toolbar buttons</property>
+ <property name="label" translatable="yes">_Icons</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkRadioMenuItem" id="tb_style_labels">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Show only labels in toolbar buttons</property>
+ <property name="label" translatable="yes">_Labels</property>
+ <property name="use_underline">True</property>
+ <property name="active">False</property>
+ <property name="group">tb_style_icons</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkRadioMenuItem" id="tb_style_both">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Show both icons and labels in toolbar buttons</property>
+ <property name="label" translatable="yes">_Both</property>
+ <property name="use_underline">True</property>
+ <property name="active">False</property>
+ <property name="group">tb_style_icons</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkRadioMenuItem" id="tb_style_bothh">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Sideways</property>
+ <property name="use_underline">True</property>
+ <property name="active">False</property>
+ <property name="group">tb_style_icons</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
</widget>
</child>
<child>
- <widget class="GtkImageMenuItem" id=" ">
+ <widget class="GtkImageMenuItem" id=" detached_windows">
<property name="visible">True</property>
<property name="label" translatable="yes">_Detached windows</property>
<property name="use_underline">True</property>
<child internal-child="image">
- <widget class="GtkImage" id="image440">
+ <widget class="GtkImage" id="image513">
<property name="visible">True</property>
<property name="stock">gtk-dnd-multiple</property>
<property name="icon_size">1</property>
</child>
<child>
- <widget class="GtkMenu" id=" _menu">
+ <widget class="GtkMenu" id=" detached_windows_menu">
<child>
<widget class="GtkCheckMenuItem" id="detach_vm">
<property name="use_underline">True</property>
<child internal-child="image">
- <widget class="GtkImage" id="image441">
+ <widget class="GtkImage" id="image514">
<property name="visible">True</property>
<property name="stock">gtk-select-font</property>
<property name="icon_size">1</property>
<signal name="activate" handler="on_devform_activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image442">
+ <widget class="GtkImage" id="image515">
<property name="visible">True</property>
<property name="stock">gtk-zoom-100</property>
<property name="icon_size">1</property>
<signal name="activate" handler="on_devdir_activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image443">
+ <widget class="GtkImage" id="image516">
<property name="visible">True</property>
<property name="stock">gtk-home</property>
<property name="icon_size">1</property>
<signal name="activate" handler="on_external_programs_activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image444">
+ <widget class="GtkImage" id="image517">
<property name="visible">True</property>
<property name="stock">gtk-preferences</property>
<property name="icon_size">1</property>
<signal name="activate" handler="on_save_activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image445">
+ <widget class="GtkImage" id="image518">
<property name="visible">True</property>
<property name="stock">gtk-save</property>
<property name="icon_size">1</property>
<signal name="activate" handler="on_about_activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image446">
+ <widget class="GtkImage" id="image519">
<property name="visible">True</property>
<property name="stock">gtk-help</property>
<property name="icon_size">1</property>
<widget class="GtkToolButton" id="attach_button">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Attach all windows</property>
- <property name="label" translatable="yes"></property>
+ <property name="label" translatable="yes">Attach</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-dnd</property>
<property name="visible_horizontal">True</property>
<property name="snap_edge">GTK_POS_TOP</property>
<child>
- <widget class="GtkToolbar" id="mixal_toolbar">
+ <widget class="GtkToolbar" id="dlg_toolbar">
<property name="border_width">2</property>
<property name="visible">True</property>
<property name="can_default">True</property>
<widget class="GtkToolButton" id="attach_button">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Attach window</property>
- <property name="label" translatable="yes"></property>
+ <property name="label" translatable="yes">Attach</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-dnd</property>
<property name="visible_horizontal">True</property>
<property name="snap_edge">GTK_POS_TOP</property>
<child>
- <widget class="GtkToolbar" id="devices_toolbar">
+ <widget class="GtkToolbar" id="dlg_toolbar">
<property name="border_width">2</property>
<property name="visible">True</property>
<property name="can_default">True</property>
<widget class="GtkToolButton" id="attach_button">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Attach window</property>
- <property name="label" translatable="yes"></property>
+ <property name="label" translatable="yes">Attach</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-dnd</property>
<property name="visible_horizontal">True</property>
<property name="snap_edge">GTK_POS_TOP</property>
<child>
- <widget class="GtkToolbar" id="mixvm_toolbar">
+ <widget class="GtkToolbar" id="dlg_toolbar">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
<widget class="GtkToolButton" id="attach_button">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Attach window</property>
- <property name="label" translatable="yes"></property>
+ <property name="label" translatable="yes">Attach</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-dnd</property>
<property name="visible_horizontal">True</property>
index 6bf691e7a75fbc9b935fc7f39abcd180961fec60..c4f2ef674710d846647365615294720f7850e082 100644 (file)
@@ -81,6 +81,7 @@ static void mixal_detach_ (void);
static void dev_attach_ (void);
static void dev_detach_ (void);
static void update_attach_buttons_ (void);
+static void on_tb_style_ (GtkMenuItem *w, gpointer style);
static void on_nb_switch_ (GtkNotebook *notebook, GtkWidget *page,
guint page_num, gpointer user_data);
@@ -223,7 +224,6 @@ on_widget_attach (GtkWidget *ign, gpointer id)
mixgtk_wm_attach_window (GPOINTER_TO_INT (id));
}
-
/* about box */
void
on_about_activate (GtkWidget *w, gpointer data)
static void
init_tb_ (void)
{
+ gchar *names[4];
+ gint k;
+ gint tb_style = mixgtk_config_tb_style ();
+
tb_menu_ = GTK_CHECK_MENU_ITEM
(mixgtk_widget_factory_get_child_by_name (MIXGTK_MAIN,
TB_MENU_NAME_));
g_assert (attach_button_);
g_assert (detach_button_);
+
+ names[GTK_TOOLBAR_ICONS] = "tb_style_icons";
+ names[GTK_TOOLBAR_TEXT] = "tb_style_labels";
+ names[GTK_TOOLBAR_BOTH] = "tb_style_both";
+ names[GTK_TOOLBAR_BOTH_HORIZ] = "tb_style_bothh";
+
+ for (k = 0; k < 4; ++k)
+ {
+ GtkWidget *item =
+ mixgtk_widget_factory_get_child_by_name (MIXGTK_MAIN, names[k]);
+ g_signal_connect (G_OBJECT (item),
+ "activate",
+ G_CALLBACK (on_tb_style_), GUINT_TO_POINTER (k));
+ if (k == tb_style)
+ {
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE);
+ }
+ }
+}
+
+static void
+on_tb_style_ (GtkMenuItem *w, gpointer style)
+{
+ static const gchar *TB_NAME = "main_toolbar";
+ static const gchar *TB_DNAME = "dlg_toolbar";
+
+ guint ui_style = GPOINTER_TO_UINT (style);
+ gint k;
+
+ GtkToolbar *tb = GTK_TOOLBAR
+ (mixgtk_widget_factory_get_child_by_name (MIXGTK_MAIN, TB_NAME));
+ gtk_toolbar_set_style (tb, ui_style);
+
+ for (k = 0; k < INF_NO_; ++k)
+ {
+ GtkToolbar *tb = GTK_TOOLBAR
+ (mixgtk_widget_factory_get_child_by_name (infos_[k].dialog, TB_DNAME));
+ gtk_toolbar_set_style (tb, ui_style);
+ }
+
+ mixgtk_config_set_tb_style (ui_style);
}
static void
{
static const gchar *HANDLE_NAME = "tb_handle";
- int k;
+ gint k;
GtkWidget *handle =
mixgtk_widget_factory_get_child_by_name (MIXGTK_MAIN, HANDLE_NAME);