[Goodies-commits] r6678 - ristretto/branches/ristretto-gio/src

Stephan Arts stephan at xfce.org
Fri Feb 13 00:20:11 CET 2009


Author: stephan
Date: 2009-02-12 23:20:10 +0000 (Thu, 12 Feb 2009)
New Revision: 6678

Modified:
   ristretto/branches/ristretto-gio/src/main_window.c
Log:
Add some comments to the code



Modified: ristretto/branches/ristretto-gio/src/main_window.c
===================================================================
--- ristretto/branches/ristretto-gio/src/main_window.c	2009-02-12 23:11:48 UTC (rev 6677)
+++ ristretto/branches/ristretto-gio/src/main_window.c	2009-02-12 23:20:10 UTC (rev 6678)
@@ -271,6 +271,7 @@
     window->priv->ui_manager = gtk_ui_manager_new ();
     window->priv->settings_manager = rstto_settings_new();
 
+    /* Create mergeid's for adding ui-components */
     window->priv->play_merge_id = gtk_ui_manager_new_merge_id (window->priv->ui_manager);
     window->priv->pause_merge_id = gtk_ui_manager_new_merge_id (window->priv->ui_manager);
 
@@ -281,12 +282,15 @@
 
     window->priv->play_action = gtk_action_new ("play", "_Play", "Play slideshow", GTK_STOCK_MEDIA_PLAY);
     window->priv->pause_action = gtk_action_new ("pause", "_Pause", "Pause slideshow", GTK_STOCK_MEDIA_PAUSE);
+    /* Add the same accelerator path to play and pause, so the same kb-shortcut will be used for starting and stopping the slideshow */
     gtk_action_set_accel_path (window->priv->pause_action, "<Actions>/RsttoWindow/play");
     gtk_action_set_accel_path (window->priv->play_action, "<Actions>/RsttoWindow/play");
+    /* Add the play and pause actions to the actiongroup */
     gtk_action_group_add_action (window->priv->action_group,
                                  window->priv->play_action);
     gtk_action_group_add_action (window->priv->action_group,
                                  window->priv->pause_action);
+    /* Connect signal-handlers */
     g_signal_connect(G_OBJECT(window->priv->play_action), "activate", G_CALLBACK(cb_rstto_main_window_play), window);
     g_signal_connect(G_OBJECT(window->priv->pause_action), "activate", G_CALLBACK(cb_rstto_main_window_pause), window);
 
@@ -890,6 +894,7 @@
  * @widget:
  * @window:
  *
+ * Remove the play button from the menu, and add the pause button.
  *
  */
 static void
@@ -912,6 +917,7 @@
  * @widget:
  * @window:
  *
+ * Remove the pause button from the menu, and add the play button.
  *
  */
 static void




More information about the Goodies-commits mailing list