[Goodies-commits] r3250 - ristretto/trunk/src

Stephan Arts stephan at xfce.org
Tue Sep 25 22:34:34 CEST 2007


Author: stephan
Date: 2007-09-25 20:34:34 +0000 (Tue, 25 Sep 2007)
New Revision: 3250

Modified:
   ristretto/trunk/src/main.c
   ristretto/trunk/src/main_window.c
   ristretto/trunk/src/main_window.h
Log:
Fix other settings


Modified: ristretto/trunk/src/main.c
===================================================================
--- ristretto/trunk/src/main.c	2007-09-25 17:57:19 UTC (rev 3249)
+++ ristretto/trunk/src/main.c	2007-09-25 20:34:34 UTC (rev 3250)
@@ -65,6 +65,7 @@
     //gint slideshow_timeout = xfce_rc_read_int_entry(xfce_rc, "SlideShowTimeout", 5000);
     
     GtkWidget *window = rstto_main_window_new();
+    gtk_widget_ref(window);
 
 
     g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(gtk_main_quit), NULL);
@@ -87,8 +88,20 @@
     rstto_main_window_set_show_toolbar(RSTTO_MAIN_WINDOW(window), show_toolbar);
 
     gtk_main();
+    xfce_rc_write_bool_entry(xfce_rc, "ShowToolBar", rstto_main_window_get_show_toolbar(RSTTO_MAIN_WINDOW(window)));
+    xfce_rc_write_bool_entry(xfce_rc, "ShowThumbnailViewer", rstto_main_window_get_show_thumbnail_viewer(RSTTO_MAIN_WINDOW(window)));
+    switch (rstto_main_window_get_thumbnail_viewer_orientation(RSTTO_MAIN_WINDOW(window)))
+    {
+        case GTK_ORIENTATION_VERTICAL:
+            xfce_rc_write_entry(xfce_rc, "ThumbnailViewerOrientation", "vertical");
+            break;
+        case GTK_ORIENTATION_HORIZONTAL:
+            xfce_rc_write_entry(xfce_rc, "ThumbnailViewerOrientation", "horizontal");
+            break;
+    }
     xfce_rc_flush(xfce_rc);
     xfce_rc_close(xfce_rc);
+    gtk_widget_unref(window);
     return 0;
 }
 

Modified: ristretto/trunk/src/main_window.c
===================================================================
--- ristretto/trunk/src/main_window.c	2007-09-25 17:57:19 UTC (rev 3249)
+++ ristretto/trunk/src/main_window.c	2007-09-25 20:34:34 UTC (rev 3250)
@@ -614,6 +614,24 @@
             visibility);
 }
 
+gboolean
+rstto_main_window_get_show_toolbar (RsttoMainWindow *window)
+{
+    return window->priv->settings.toolbar_visibility;
+}
+
+gboolean
+rstto_main_window_get_show_thumbnail_viewer (RsttoMainWindow *window)
+{
+    return window->priv->settings.thumbnail_viewer_visibility;
+}
+
+GtkOrientation
+rstto_main_window_get_thumbnail_viewer_orientation (RsttoMainWindow *window)
+{
+    return window->priv->settings.thumbnail_viewer_orientation;
+}
+
 /* CALLBACK FUNCTIONS */
 
 static void
@@ -1049,3 +1067,4 @@
 {
     rstto_picture_viewer_fit_scale(RSTTO_PICTURE_VIEWER(window->priv->picture_viewer));
 }
+

Modified: ristretto/trunk/src/main_window.h
===================================================================
--- ristretto/trunk/src/main_window.h	2007-09-25 17:57:19 UTC (rev 3249)
+++ ristretto/trunk/src/main_window.h	2007-09-25 20:34:34 UTC (rev 3250)
@@ -66,6 +66,12 @@
 rstto_main_window_set_show_thumbnail_viewer (RsttoMainWindow *window, gboolean visibility);
 void
 rstto_main_window_set_show_toolbar (RsttoMainWindow *window, gboolean visibility);
+gboolean
+rstto_main_window_get_show_toolbar (RsttoMainWindow *window);
+gboolean
+rstto_main_window_get_show_thumbnail_viewer (RsttoMainWindow *window);
+GtkOrientation
+rstto_main_window_get_thumbnail_viewer_orientation (RsttoMainWindow *window);
 
 G_END_DECLS
 




More information about the Goodies-commits mailing list