r22435 - gnucash/branches/2.4/src - [r22427]Update to gtkosxapplication version 2

John Ralls jralls at code.gnucash.org
Tue Oct 9 18:52:38 EDT 2012


Author: jralls
Date: 2012-10-09 18:52:38 -0400 (Tue, 09 Oct 2012)
New Revision: 22435
Trac: http://svn.gnucash.org/trac/changeset/22435

Modified:
   gnucash/branches/2.4/src/core-utils/binreloc.c
   gnucash/branches/2.4/src/gnome-utils/gnc-main-window.c
Log:
[r22427]Update to gtkosxapplication version 2

Modified: gnucash/branches/2.4/src/core-utils/binreloc.c
===================================================================
--- gnucash/branches/2.4/src/core-utils/binreloc.c	2012-10-09 22:38:02 UTC (rev 22434)
+++ gnucash/branches/2.4/src/core-utils/binreloc.c	2012-10-09 22:52:38 UTC (rev 22435)
@@ -63,7 +63,7 @@
     g_free (prefix);
     return result;
 #elif defined MAC_INTEGRATION
-    gchar *path = quartz_application_get_executable_path();
+    gchar *path = gtkosx_application_get_executable_path();
     g_print ("Application Path %s\n", path);
     return path;
 #else
@@ -363,8 +363,8 @@
 gnc_gbr_find_prefix (const gchar *default_prefix)
 {
 #if defined ENABLE_BINRELOC && defined MAC_INTEGRATION
-    gchar *id = quartz_application_get_bundle_id ();
-    gchar *path = quartz_application_get_resource_path ();
+    gchar *id = gtkosx_application_get_bundle_id ();
+    gchar *path = gtkosx_application_get_resource_path ();
     if (id == NULL)
     {
         gchar *dirname = g_path_get_dirname (path);

Modified: gnucash/branches/2.4/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/branches/2.4/src/gnome-utils/gnc-main-window.c	2012-10-09 22:38:02 UTC (rev 22434)
+++ gnucash/branches/2.4/src/gnome-utils/gnc-main-window.c	2012-10-09 22:52:38 UTC (rev 22435)
@@ -151,9 +151,9 @@
 static gboolean gnc_main_window_popup_menu_cb (GtkWidget *widget, GncPluginPage *page);
 
 #ifdef MAC_INTEGRATION
-static void gtk_quartz_shutdown(GtkOSXApplication *theApp, gpointer data);
-static gboolean gtk_quartz_should_quit(GtkOSXApplication *theApp, GncMainWindow *window);
-static void gtk_quartz_set_menu(GncMainWindow* window);
+static void gnc_quartz_shutdown(GtkosxApplication *theApp, gpointer data);
+static gboolean gnc_quartz_should_quit(GtkosxApplication *theApp, GncMainWindow *window);
+static void gnc_quartz_set_menu(GncMainWindow* window);
 #endif
 
 /** The instance private data structure for an embedded window
@@ -1522,9 +1522,9 @@
                      (char *)NULL);
 #ifdef MAC_INTEGRATION
     {
-        GtkOSXApplication *theApp =
-            g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
-        gtk_osxapplication_sync_menubar(theApp);
+        GtkosxApplication *theApp =
+            g_object_new(GTKOSX_TYPE_APPLICATION, NULL);
+        gtkosx_application_sync_menubar(theApp);
     }
 #endif
     LEAVE(" ");
@@ -2358,7 +2358,7 @@
     gnc_main_window_update_title(window);
 
 #ifdef MAC_INTEGRATION
-    gtk_quartz_set_menu(window);
+    gnc_quartz_set_menu(window);
 #else
     gnc_main_window_update_all_menu_items();
 #endif
@@ -3384,7 +3384,7 @@
  * loop.
  */
 static void
-gtk_quartz_shutdown (GtkOSXApplication *theApp, gpointer data)
+gnc_quartz_shutdown (GtkosxApplication *theApp, gpointer data)
 {
 /* Do Nothing. It's too late. */
 }
@@ -3396,7 +3396,7 @@
  * opportunity to shut down.
  */
 static gboolean
-gtk_quartz_should_quit (GtkOSXApplication *theApp, GncMainWindow *window)
+gnc_quartz_should_quit (GtkosxApplication *theApp, GncMainWindow *window)
 {
     QofSession *session;
     gboolean needs_save;
@@ -3417,10 +3417,10 @@
 }
 
 static void
-gtk_quartz_set_menu(GncMainWindow* window)
+gnc_quartz_set_menu(GncMainWindow* window)
 {
-    GtkOSXApplicationMenuGroup *group;
-    GtkOSXApplication *theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
+    GtkosxApplicationMenuGroup *group;
+    GtkosxApplication *theApp = g_object_new(GTKOSX_TYPE_APPLICATION, NULL);
     GtkWidget       *menu;
     GtkWidget       *item;
 
@@ -3428,7 +3428,7 @@
     if (GTK_IS_MENU_ITEM (menu))
         menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (menu));
     gtk_widget_hide(menu);
-    gtk_osxapplication_set_menu_bar (theApp, GTK_MENU_SHELL (menu));
+    gtkosx_application_set_menu_bar (theApp, GTK_MENU_SHELL (menu));
 
     item = gtk_ui_manager_get_widget (window->ui_merge,
                                       "/menubar/File/FileQuit");
@@ -3438,26 +3438,26 @@
    item = gtk_ui_manager_get_widget (window->ui_merge,
                                       "/menubar/Edit/EditPreferences");
     if (GTK_IS_MENU_ITEM (item))
-        gtk_osxapplication_insert_app_menu_item (theApp, GTK_WIDGET (item), 0);
+        gtkosx_application_insert_app_menu_item (theApp, GTK_WIDGET (item), 0);
 
     item = gtk_ui_manager_get_widget (window->ui_merge,
                                       "/menubar/Help/HelpAbout");
     if (GTK_IS_MENU_ITEM (item))
     {
-        gtk_osxapplication_insert_app_menu_item (theApp,
+        gtkosx_application_insert_app_menu_item (theApp,
 						 gtk_separator_menu_item_new (),
 						 0);
-        gtk_osxapplication_insert_app_menu_item (theApp, GTK_WIDGET (item), 0);
+        gtkosx_application_insert_app_menu_item (theApp, GTK_WIDGET (item), 0);
     }
 
     item = gtk_ui_manager_get_widget (window->ui_merge,
                                       "/menubar/Help");
-    gtk_osxapplication_set_help_menu(theApp, GTK_MENU_ITEM(item));
+    gtkosx_application_set_help_menu(theApp, GTK_MENU_ITEM(item));
     item = gtk_ui_manager_get_widget (window->ui_merge,
                                       "/menubar/Windows");
-    gtk_osxapplication_set_window_menu(theApp, GTK_MENU_ITEM(item));
+    gtkosx_application_set_window_menu(theApp, GTK_MENU_ITEM(item));
     g_signal_connect(theApp, "NSApplicationBlockTermination",
-                     G_CALLBACK(gtk_quartz_should_quit), window);
+                     G_CALLBACK(gnc_quartz_should_quit), window);
 
 }
 #endif //MAC_INTEGRATION
@@ -4068,19 +4068,19 @@
 {
     GList *window_iter;
 #ifdef MAC_INTEGRATION
-    GtkOSXApplication *theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
+    GtkosxApplication *theApp = g_object_new(GTKOSX_TYPE_APPLICATION, NULL);
 #endif
     for (window_iter = active_windows; window_iter != NULL; window_iter = window_iter->next)
     {
         gtk_widget_show(GTK_WIDGET(window_iter->data));
 #ifdef MAC_INTEGRATION
-        gtk_quartz_set_menu(window_iter->data);
+        gnc_quartz_set_menu(window_iter->data);
 #endif
     }
 #ifdef MAC_INTEGRATION
     g_signal_connect(theApp, "NSApplicationWillTerminate",
-                     G_CALLBACK(gtk_quartz_shutdown), NULL);
-    gtk_osxapplication_ready(theApp);
+                     G_CALLBACK(gnc_quartz_shutdown), NULL);
+    gtkosx_application_ready(theApp);
 #endif
 }
 



More information about the gnucash-changes mailing list