mirror of
https://gitlab.gnome.org/GNOME/eog
synced 2024-10-18 14:04:27 +00:00
Added checkbox to disable auto switching of images in slideshow.
2005-04-11 Jens Finke <jens@triq.net> * eog.glade: Added checkbox to disable auto switching of images in slideshow. * eog.schemas.in: New key full_screen/auto_advance * shell/eog-preferences.c (check_auto_advance_toggle_cb): Disable spin button when unchecked, otherwise enable it. * libeog/eog-fullscreen.c (eog_full_screen_new): Auto advance of images depend on auto_advance gconf key, not whether seconds are greater zero.
This commit is contained in:
parent
8a49a0699d
commit
7560f58cd3
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2005-04-11 Jens Finke <jens@triq.net>
|
||||
|
||||
* eog.glade: Added checkbox to disable auto switching of images in slideshow.
|
||||
|
||||
* eog.schemas.in: New key full_screen/auto_advance
|
||||
|
||||
* shell/eog-preferences.c (check_auto_advance_toggle_cb): Disable spin button
|
||||
when unchecked, otherwise enable it.
|
||||
|
||||
* libeog/eog-fullscreen.c (eog_full_screen_new): Auto advance of images depend
|
||||
on auto_advance gconf key, not whether seconds are greater zero.
|
||||
|
||||
2005-04-11 Jens Finke <jens@triq.net>
|
||||
|
||||
* shell/eog-gtk-ui.xml: Added Slideshow item to View menu.
|
||||
|
|
84
eog.glade
84
eog.glade
|
@ -498,25 +498,90 @@
|
|||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox9">
|
||||
<widget class="GtkCheckButton" id="auto_advance_check">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox27">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label17">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Show next image _automatically</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="seconds_hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">6</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label17">
|
||||
<widget class="GtkLabel" id="label35">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Show _next image automatically after:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="label" translatable="yes"> </property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label36">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Switch image after</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">seconds_spin</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -535,7 +600,7 @@
|
|||
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
|
||||
<property name="snap_to_ticks">False</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="adjustment">0 0 100 1 10 10</property>
|
||||
<property name="adjustment">5 1 100 1 10 10</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -547,8 +612,8 @@
|
|||
<child>
|
||||
<widget class="GtkLabel" id="label18">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">seconds</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="label" translatable="yes">_seconds</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
|
@ -557,6 +622,7 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">seconds_spin</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
|
|
@ -104,12 +104,25 @@
|
|||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/eog/full_screen/auto_advance</key>
|
||||
<applyto>/apps/eog/full_screen/auto_advance</applyto>
|
||||
<owner>eog</owner>
|
||||
<type>bool</type>
|
||||
<default>0</default>
|
||||
<locale name="C">
|
||||
<short>Show next image automatically in fullscreen mode.</short>
|
||||
<long>If this is set to TRUE images will be switched after
|
||||
number of seconds determined by the 'full_screen/seconds' key.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/eog/full_screen/seconds</key>
|
||||
<applyto>/apps/eog/full_screen/seconds</applyto>
|
||||
<owner>eog</owner>
|
||||
<type>int</type>
|
||||
<default>0</default>
|
||||
<default>5</default>
|
||||
<locale name="C">
|
||||
<short>Delay in seconds until showing the next image</short>
|
||||
<long>A value greater than 0 determines the seconds an image stays
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#define EOG_CONF_FULLSCREEN_LOOP "/apps/eog/full_screen/loop"
|
||||
#define EOG_CONF_FULLSCREEN_UPSCALE "/apps/eog/full_screen/upscale"
|
||||
#define EOG_CONF_FULLSCREEN_AUTO_ADVANCE "/apps/eog/full_screen/auto_advance"
|
||||
#define EOG_CONF_FULLSCREEN_SECONDS "/apps/eog/full_screen/seconds"
|
||||
|
||||
#define EOG_CONF_UI_TOOLBAR "/apps/eog/ui/toolbar"
|
||||
|
|
|
@ -807,7 +807,12 @@ eog_full_screen_new (EogImageList *image_list, EogImage *start_image)
|
|||
/* read configuration */
|
||||
client = gconf_client_get_default ();
|
||||
priv->loop = gconf_client_get_bool (client, EOG_CONF_FULLSCREEN_LOOP, NULL);
|
||||
priv->switch_timeout = gconf_client_get_int (client, EOG_CONF_FULLSCREEN_SECONDS, NULL);
|
||||
if (gconf_client_get_bool (client, EOG_CONF_FULLSCREEN_AUTO_ADVANCE, NULL)) {
|
||||
priv->switch_timeout = gconf_client_get_int (client, EOG_CONF_FULLSCREEN_SECONDS, NULL);
|
||||
}
|
||||
else {
|
||||
priv->switch_timeout = 0;
|
||||
}
|
||||
upscale = gconf_client_get_bool (client, EOG_CONF_FULLSCREEN_UPSCALE, NULL);
|
||||
antialiasing = gconf_client_get_bool (client, EOG_CONF_VIEW_INTERPOLATE, NULL);
|
||||
eog_scroll_view_set_zoom_upscale (EOG_SCROLL_VIEW (widget), upscale);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#define GCONF_OBJECT_KEY "GCONF_KEY"
|
||||
#define GCONF_OBJECT_VALUE "GCONF_VALUE"
|
||||
#define OBJECT_WIDGET "OBJECT_WIDGET"
|
||||
|
||||
static void
|
||||
check_toggle_cb (GtkWidget *widget, gpointer data)
|
||||
|
@ -23,6 +24,28 @@ check_toggle_cb (GtkWidget *widget, gpointer data)
|
|||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
check_auto_advance_toggle_cb (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
char *key = NULL;
|
||||
GtkWidget *child = NULL;
|
||||
gboolean state = FALSE;
|
||||
|
||||
key = g_object_get_data (G_OBJECT (widget), GCONF_OBJECT_KEY);
|
||||
if (key == NULL) return;
|
||||
|
||||
state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
|
||||
|
||||
gconf_client_set_bool (GCONF_CLIENT (data),
|
||||
key, state,
|
||||
NULL);
|
||||
|
||||
child = g_object_get_data (G_OBJECT (widget), OBJECT_WIDGET);
|
||||
if (child != NULL) {
|
||||
g_object_set (child, "sensitive", state, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
spin_button_changed_cb (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
|
@ -118,7 +141,7 @@ eog_preferences_show (GConfClient *client)
|
|||
char *value;
|
||||
GdkColor color;
|
||||
|
||||
xml = glade_xml_new (DATADIR "/eog/glade/eog.glade", "Hig Preferences Dialog", "eog");
|
||||
xml = glade_xml_new ("../eog.glade" /* DATADIR "/eog/glade/eog.glade" */, "Hig Preferences Dialog", "eog");
|
||||
g_assert (xml != NULL);
|
||||
|
||||
dlg = glade_xml_get_widget (xml, "Hig Preferences Dialog");
|
||||
|
@ -215,6 +238,15 @@ eog_preferences_show (GConfClient *client)
|
|||
G_CALLBACK (check_toggle_cb),
|
||||
client);
|
||||
|
||||
widget = glade_xml_get_widget (xml, "auto_advance_check");
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget),
|
||||
gconf_client_get_bool (client, EOG_CONF_FULLSCREEN_AUTO_ADVANCE, NULL));
|
||||
g_object_set_data (G_OBJECT (widget), OBJECT_WIDGET, glade_xml_get_widget (xml, "seconds_hbox"));
|
||||
g_object_set_data (G_OBJECT (widget), GCONF_OBJECT_KEY, EOG_CONF_FULLSCREEN_AUTO_ADVANCE);
|
||||
g_signal_connect (G_OBJECT (widget),
|
||||
"toggled",
|
||||
G_CALLBACK (check_auto_advance_toggle_cb),
|
||||
client);
|
||||
|
||||
widget = glade_xml_get_widget (xml, "seconds_spin");
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget),
|
||||
|
@ -224,5 +256,9 @@ eog_preferences_show (GConfClient *client)
|
|||
"changed",
|
||||
G_CALLBACK (spin_button_changed_cb),
|
||||
client);
|
||||
|
||||
if (!gconf_client_get_bool (client, EOG_CONF_FULLSCREEN_AUTO_ADVANCE, NULL)) {
|
||||
widget = glade_xml_get_widget (xml, "seconds_hbox");
|
||||
g_object_set (widget, "sensitive", FALSE, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue