[gnome-photos/help] Build integration 3



commit d9420b0af9c0e32b402747736534de885f28dabf
Author: Aruna Sankaranarayanan <arunasank src gnome org>
Date:   Sat Mar 22 01:43:15 2014 +0530

    Build integration 3
    
    Add signal and action to photos-application.c

 src/photos-application.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index 1a90d34..bcc58cd 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -133,7 +133,18 @@ photos_application_refresh_data_free (PhotosApplicationRefreshData *data)
   g_slice_free (PhotosApplicationRefreshData, data);
 }
 
-
+static void photos_application_help()
+{
+       var screen = main_window.get_screen ();
+       try
+       {
+               Gtk.show_uri (screen, "help:photos", Gtk.get_current_event_time ());
+       }
+       catch (Error err)
+       {
+               message ("Error opening help: %s", err.message);
+       }
+}
 static void
 photos_application_about (PhotosApplication *self, GVariant *parameter)
 {
@@ -693,6 +704,7 @@ photos_application_startup (GApplication *application)
   priv->mode_cntrlr = photos_mode_controller_dup_singleton ();
 
   action = g_simple_action_new ("about", NULL);
+
   g_signal_connect_swapped (action, "activate", G_CALLBACK (photos_application_about), self);
   g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (action));
   g_object_unref (action);
@@ -754,6 +766,11 @@ photos_application_startup (GApplication *application)
 
   photos_application_init_app_menu (self);
 
+  action = g_simple_action_new ("help", NULL);
+  g_signal_connect_swapped (action, "activate", G_CALLBACK (photos_application_help), self);
+  g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (action));
+  g_object_unref (action);
+
   gtk_application_add_accelerator (GTK_APPLICATION (self), "<Primary>q", "app.quit", NULL);
   gtk_application_add_accelerator (GTK_APPLICATION (self), "F11", "app.fullscreen", NULL);
   gtk_application_add_accelerator (GTK_APPLICATION (self), "F10", "app.gear-menu", NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]