fixup preference dialog handling of Developer view options

This commit is contained in:
Vincent Sanders 2014-08-02 02:19:06 +01:00
parent c0548fc472
commit ca077b0638
5 changed files with 2817 additions and 2469 deletions

View File

@ -170,8 +170,8 @@ G_MODULE_EXPORT void nsgtk_preferences_checkShowSingleTab_toggled(GtkToggleButto
G_MODULE_EXPORT void nsgtk_preferences_checkShowSingleTab_realize(GtkWidget *widget, struct ppref *priv);
G_MODULE_EXPORT void nsgtk_preferences_comboTabPosition_changed(GtkComboBox *widget, struct ppref *priv);
G_MODULE_EXPORT void nsgtk_preferences_comboTabPosition_realize(GtkWidget *widget, struct ppref *priv);
G_MODULE_EXPORT void nsgtk_preferences_sourceButtonWindow_toggled(GtkToggleButton *togglebutton, struct ppref *priv);
G_MODULE_EXPORT void nsgtk_preferences_sourceButtonWindow_realize(GtkWidget *widget, struct ppref *priv);
G_MODULE_EXPORT void nsgtk_preferences_comboDeveloperView_changed(GtkComboBox *widget, struct ppref *priv);
G_MODULE_EXPORT void nsgtk_preferences_comboDeveloperView_realize(GtkWidget *widget, struct ppref *priv);
G_MODULE_EXPORT void nsgtk_preferences_comboButtonType_changed(GtkComboBox *widget, struct ppref *priv);
G_MODULE_EXPORT void nsgtk_preferences_comboButtonType_realize(GtkWidget *widget, struct ppref *priv);
G_MODULE_EXPORT void nsgtk_preferences_setCurrentPage_clicked(GtkButton *button, struct ppref *priv);
@ -822,25 +822,23 @@ nsgtk_preferences_comboTabPosition_realize(GtkWidget *widget,
nsoption_int(position_tab));
}
/* Source */
/* source view opening */
TOGGLEBUTTON_SIGNALS(sourceButtonTab, source_tab)
/* Tools */
/* developer view opening */
G_MODULE_EXPORT void
nsgtk_preferences_sourceButtonWindow_toggled(GtkToggleButton *togglebutton,
struct ppref *priv)
nsgtk_preferences_comboDeveloperView_changed(GtkComboBox *widget,
struct ppref *priv)
{
nsoption_set_bool(source_tab,
!gtk_toggle_button_get_active(togglebutton));
/* set the option */
nsoption_set_int(developer_view, gtk_combo_box_get_active(widget));
}
G_MODULE_EXPORT void
nsgtk_preferences_sourceButtonWindow_realize(GtkWidget *widget,
nsgtk_preferences_comboDeveloperView_realize(GtkWidget *widget,
struct ppref *priv)
{
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),
!nsoption_bool(source_tab));
gtk_combo_box_set_active(GTK_COMBO_BOX(widget),
nsoption_int(developer_view));
}

View File

@ -65,9 +65,6 @@ NSOPTION_BOOL(new_blank, false)
/* path to save hotlist file */
NSOPTION_STRING(hotlist_path, NULL)
/* open source views in a tab */
NSOPTION_BOOL(source_tab, false)
/* Developer information viewer display method */
NSOPTION_INTEGER(developer_view, 0)

File diff suppressed because it is too large Load Diff

View File

@ -736,7 +736,7 @@
</packing>
</child>
<child>
<object class="GtkFrame" id="frame_appearance_source">
<object class="GtkFrame" id="frame_appearance_tools">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
@ -753,59 +753,37 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">preferencesSourceOpen</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkRadioButton" id="sourceButtonWindow">
<property name="label" translatable="yes">preferencesSourceWindow</property>
<property name="use_action_appearance">False</property>
<object class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="halign">start</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0.5</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">sourceButtonTab</property>
<signal name="toggled" handler="nsgtk_preferences_sourceButtonWindow_toggled" swapped="no"/>
<signal name="realize" handler="nsgtk_preferences_sourceButtonWindow_realize" swapped="no"/>
<property name="can_focus">False</property>
<property name="label" translatable="yes">preferencesDeveloperView</property>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="sourceButtonTab">
<property name="label" translatable="yes">preferencesSourceTab</property>
<property name="use_action_appearance">False</property>
<object class="GtkComboBox" id="comboboxDeveloperView">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="use_action_appearance">False</property>
<property name="xalign">0.5</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="nsgtk_preferences_sourceButtonTab_toggled" swapped="no"/>
<signal name="realize" handler="nsgtk_preferences_sourceButtonTab_realize" swapped="no"/>
<property name="model">liststore_developer_view</property>
<signal name="changed" handler="nsgtk_preferences_comboDeveloperView_changed" swapped="no"/>
<signal name="realize" handler="nsgtk_preferences_comboDeveloperView_realize" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="cellrenderertext10"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">True</property>
@ -828,7 +806,7 @@
<object class="GtkLabel" id="label12">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">preferencesSource</property>
<property name="label" translatable="yes">preferencesTools</property>
<property name="use_markup">True</property>
</object>
</child>
@ -2982,6 +2960,23 @@
</row>
</data>
</object>
<object class="GtkListStore" id="liststore_developer_view">
<columns>
<!-- column-name Type -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">preferencesDeveloperViewWindow</col>
</row>
<row>
<col id="0" translatable="yes">preferencesDeveloperViewTab</col>
</row>
<row>
<col id="0" translatable="yes">preferencesDeveloperViewEditor</col>
</row>
</data>
</object>
<object class="GtkListStore" id="liststore_image_loading">
<columns>
<!-- column-name Type -->

View File

@ -2322,10 +2322,11 @@ en.gtk.preferencesTabsAlways:Always show tab bar
en.gtk.preferencesTabsSwitch:Switch to newly opened tabs immediately
en.gtk.preferencesTabsNewly:Newly opened tabs are blank
en.gtk.preferencesTabsPosition:Position:
en.gtk.preferencesSource:<b>Source</b>
en.gtk.preferencesSourceOpen:Open source view in new:
en.gtk.preferencesSourceWindow:window
en.gtk.preferencesSourceTab:tab
en.gtk.preferencesTools:<b>Tools</b>
en.gtk.preferencesDeveloperView:Open developer views in a
en.gtk.preferencesDeveloperViewWindow:Window
en.gtk.preferencesDeveloperViewTab:Tab
en.gtk.preferencesDeveloperViewEditor:Editor
en.gtk.preferencesURLbar:<b>URLbar</b>
en.gtk.preferencesURLbarDisplay:Display recently visited URLs as you type
en.gtk.preferencesToolbar:<b>Toolbar</b>