[gtk+/wip/gapplication] Shorten some api



commit 3ed282e6f1032f5cb06e178d2ab7a5dc48477265
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jun 3 23:25:05 2010 -0400

    Shorten some api
    
    Take the main out of gtk_application_est_main_action_group, since there
    is only one group anyway.

 gtk/gtkapplication.c    |    6 +++---
 gtk/gtkapplication.h    |   20 ++++++++++----------
 tests/testapplication.c |    6 +++---
 3 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index f033e98..cb57f7d 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -183,7 +183,7 @@ on_action_sensitive (GtkAction      *action,
 }
 
 /**
- * gtk_application_set_main_action_group:
+ * gtk_application_set_action_group:
  * @app: A #GtkApplication
  * @group: A #GtkActionGroup
  *
@@ -201,8 +201,8 @@ on_action_sensitive (GtkAction      *action,
  * It is an error to call this function more than once.
  */
 void
-gtk_application_set_main_action_group (GtkApplication *app,
-                                       GtkActionGroup *group)
+gtk_application_set_action_group (GtkApplication *app,
+                                  GtkActionGroup *group)
 {
   GList *actions, *iter;
 
diff --git a/gtk/gtkapplication.h b/gtk/gtkapplication.h
index 8ab81b2..80eb5b3 100644
--- a/gtk/gtkapplication.h
+++ b/gtk/gtkapplication.h
@@ -74,19 +74,19 @@ struct _GtkApplicationClass
   void (*_gtk_reserved6) (void);
 };
 
-GType           gtk_application_get_type        (void) G_GNUC_CONST;
-GtkApplication* gtk_application_new             (int                 *argc,
-                                                 char              ***argv,
-                                                 const char          *appid);
+GType           gtk_application_get_type         (void) G_GNUC_CONST;
+GtkApplication* gtk_application_new              (gint             *argc,
+                                                  gchar          ***argv,
+                                                  const gchar      *appid);
 
-void            gtk_application_set_main_action_group (GtkApplication *app,
-                                                       GtkActionGroup *group);
+void            gtk_application_set_action_group (GtkApplication   *app,
+                                                  GtkActionGroup   *group);
 
-GtkWindow *     gtk_application_get_window (GtkApplication *app);
-   
-void            gtk_application_run (GtkApplication  *app);
+GtkWindow *     gtk_application_get_window       (GtkApplication   *app);
 
-void            gtk_application_quit (GtkApplication *app);
+void            gtk_application_run              (GtkApplication   *app);
+
+void            gtk_application_quit             (GtkApplication   *app);
 
 G_END_DECLS
 
diff --git a/tests/testapplication.c b/tests/testapplication.c
index 06c6db8..ed32388 100644
--- a/tests/testapplication.c
+++ b/tests/testapplication.c
@@ -27,7 +27,7 @@ static const char *builder_data =
 "  <property name=\"program-name\">Test Application</property>"
 "  <property name=\"website\">http://gtk.org</property>"
 "</object>"
-"<object class=\"GtkActionGroup\" id=\"main_actions\">"
+"<object class=\"GtkActionGroup\" id=\"actions\">"
 "  <child>"
 "      <object class=\"GtkAction\" id=\"About\">"
 "          <property name=\"name\">About</property>"
@@ -60,8 +60,8 @@ main (int argc, char **argv)
   builder = gtk_builder_new ();
   if (!gtk_builder_add_from_string (builder, builder_data, -1, NULL))
     g_error ("failed to parse UI");
-  actions = GTK_ACTION_GROUP (gtk_builder_get_object (builder, "main_actions"));
-  gtk_application_set_main_action_group (app, actions);
+  actions = GTK_ACTION_GROUP (gtk_builder_get_object (builder, "actions"));
+  gtk_application_set_action_group (app, actions);
   
   action = gtk_action_group_get_action (actions, "About");
   g_signal_connect (action, "activate", G_CALLBACK (about_activate), app);



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