Permalink
Browse files

Allow to switch message window orientation to place it on the right

  • Loading branch information...
b4n committed Sep 26, 2012
1 parent 474e60b commit 64a47b9cb691e02a00d013374856aa31708bac3b
Showing with 94 additions and 2 deletions.
  1. +82 −2 data/geany.glade
  2. +5 −0 src/keyfile.c
  3. +3 −0 src/main.c
  4. +3 −0 src/prefs.c
  5. +1 −0 src/ui_utils.h
View
@@ -1669,6 +1669,86 @@
<property name="position">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Position:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radio_msgwin_vertical">
+ <property name="label" translatable="yes">Bottom</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radio_msgwin_horizontal">
+ <property name="label" translatable="yes">Right</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radio_msgwin_vertical</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">&lt;b&gt;Message window&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
<child>
<object class="GtkFrame" id="frame4">
<property name="visible">True</property>
@@ -1795,7 +1875,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -1846,7 +1926,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
View
@@ -148,6 +148,11 @@ static void init_pref_groups(void)
"radio_sidebar_left", GTK_POS_LEFT,
"radio_sidebar_right", GTK_POS_RIGHT,
NULL);
+ stash_group_add_radio_buttons(group, &interface_prefs.msgwin_orientation,
+ "msgwin_orientation", GTK_ORIENTATION_VERTICAL,
+ "radio_msgwin_vertical", GTK_ORIENTATION_VERTICAL,
+ "radio_msgwin_horizontal", GTK_ORIENTATION_HORIZONTAL,
+ NULL);
/* editor display */
stash_group_add_toggle_button(group, &interface_prefs.highlighting_invert_all,
View
@@ -219,6 +219,9 @@ static void apply_settings(void)
if (interface_prefs.sidebar_pos != GTK_POS_LEFT)
ui_swap_sidebar_pos();
+
+ gtk_orientable_set_orientation(GTK_ORIENTABLE(ui_lookup_widget(main_widgets.window, "vpaned1")),
+ interface_prefs.msgwin_orientation);
}
View
@@ -857,6 +857,9 @@ on_prefs_dialog_response(GtkDialog *dialog, gint response, gpointer user_data)
if (interface_prefs.sidebar_pos != old_sidebar_pos)
ui_swap_sidebar_pos();
+ widget = ui_lookup_widget(main_widgets.window, "vpaned1");
+ gtk_orientable_set_orientation(GTK_ORIENTABLE(widget), interface_prefs.msgwin_orientation);
+
/* General settings */
/* startup */
widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_load_session");
View
@@ -64,6 +64,7 @@ typedef struct GeanyInterfacePrefs
gboolean use_native_windows_dialogs;
/** whether compiler messages window is automatically scrolled to show new messages */
gboolean compiler_tab_autoscroll;
+ gint msgwin_orientation; /**< orientation of the message window */
}
GeanyInterfacePrefs;

2 comments on commit 64a47b9

@codebrainz

This comment has been minimized.

Show comment Hide comment
@codebrainz

codebrainz Jan 20, 2014

Owner

Should the manual be updated to reflect this? Like after this section: http://www.geany.org/manual/current/index.html#sidebar

Owner

codebrainz replied Jan 20, 2014

Should the manual be updated to reflect this? Like after this section: http://www.geany.org/manual/current/index.html#sidebar

@b4n

This comment has been minimized.

Show comment Hide comment
@b4n

b4n Jan 28, 2015

Owner

Fixed in d33a23c

Owner

b4n replied Jan 28, 2015

Fixed in d33a23c

Please sign in to comment.