Commit bbcd4408 authored by Paolo Bacchilega's avatar Paolo Bacchilega

preferences dialog: added ability to change trasparency style

parent c1eb4265
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<requires lib="gtk+" version="3.16"/>
<object class="GtkBox" id="preferences_page">
<property name="visible">True</property>
<property name="can_focus">False</property>
......@@ -17,9 +17,9 @@
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">After loading an image:</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
......@@ -74,11 +74,10 @@
<child>
<object class="GtkCheckButton" id="toggle_reset_scrollbars">
<property name="label" translatable="yes">Reset scrollbar positions</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="xalign">0</property>
<property name="halign">start</property>
<property name="draw_indicator">True</property>
</object>
<packing>
......@@ -113,9 +112,9 @@
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Zoom quality:</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
......@@ -136,14 +135,15 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkRadioButton" id="zoom_quality_high_radiobutton">
<property name="label" translatable="yes" context="zoom quality">_High</property>
<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_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
......@@ -159,8 +159,8 @@
<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_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">zoom_quality_high_radiobutton</property>
......@@ -187,5 +187,83 @@
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Transparency:</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkBox" id="box7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkComboBoxText" id="transparency_style_combobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<items>
<item translatable="yes">Checkered</item>
<item translatable="yes">White</item>
<item translatable="yes">Gray</item>
<item translatable="yes">Black</item>
</items>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</interface>
......@@ -67,6 +67,16 @@ zoom_quality_radiobutton_toggled_cb (GtkToggleButton *button,
}
static void
transparency_style_changed_cb (GtkComboBox *combo_box,
BrowserData *data)
{
g_settings_set_enum (data->settings,
PREF_IMAGE_VIEWER_TRANSPARENCY_STYLE,
gtk_combo_box_get_active (combo_box));
}
void
image_viewer__dlg_preferences_construct_cb (GtkWidget *dialog,
GthBrowser *browser,
......@@ -97,6 +107,9 @@ image_viewer__dlg_preferences_construct_cb (GtkWidget *dialog,
else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("zoom_quality_high_radiobutton")), TRUE);
gtk_combo_box_set_active (GTK_COMBO_BOX (GET_WIDGET ("transparency_style_combobox")),
g_settings_get_enum (data->settings, PREF_IMAGE_VIEWER_TRANSPARENCY_STYLE));
g_signal_connect (GET_WIDGET ("change_zoom_combobox"),
"changed",
G_CALLBACK (zoom_change_changed_cb),
......@@ -113,6 +126,10 @@ image_viewer__dlg_preferences_construct_cb (GtkWidget *dialog,
"toggled",
G_CALLBACK (reset_scrollbars_toggled_cb),
data);
g_signal_connect (GET_WIDGET ("transparency_style_combobox"),
"changed",
G_CALLBACK (transparency_style_changed_cb),
data);
label = gtk_label_new (_("Viewer"));
gtk_widget_show (label);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment