[gtk-osx] Update glade patch and arguments for glade-3.18.



commit 9ec0d21aa0dbffb1400046620e2c69a032c45a6a
Author: John Ralls <jralls ceridwen us>
Date:   Thu Jul 9 15:03:03 2015 -0700

    Update glade patch and arguments for glade-3.18.

 modulesets-stable/gtk-osx-random.modules |    4 +-
 patches/glade-1-18.patch                 |  204 ++++++++++++++++++++++++++++++
 patches/glade-3_16_1.patch               |  157 -----------------------
 3 files changed, 206 insertions(+), 159 deletions(-)
---
diff --git a/modulesets-stable/gtk-osx-random.modules b/modulesets-stable/gtk-osx-random.modules
index 549914a..118ed76 100644
--- a/modulesets-stable/gtk-osx-random.modules
+++ b/modulesets-stable/gtk-osx-random.modules
@@ -157,10 +157,10 @@ Libglade itself is deprecated. This is the last release. -->
 <!-- Glade 3.10 is the first stable series for Gtk+-3. Note the name
      change back to just "glade"-->
   <autotools id="glade" autogen-sh="configure"
-            autogenargs="--disable-scrollkeeper">
+            autogenargs='--disable-scrollkeeper --disable-introspection CPPFLAGS="$CPPFLAGS -xobjective-c"'>
     <branch module="glade/3.18/glade-3.18.3.tar.xz" version="3.18.3"
             hash="sha256:ecdbce46e7fbfecd463be840b94fbf54d83723b3ebe075414cfd225ddab66452">
-      <patch file="http://git.gnome.org/browse/gtk-osx/plain/patches/glade-3_16_1.patch"; strip="1"/>
+      <patch file="http://git.gnome.org/browse/gtk-osx/plain/patches/glade-1-18.patch"; strip="1"/>
     </branch>
     <dependencies>
       <dep package="itstool"/>
diff --git a/patches/glade-1-18.patch b/patches/glade-1-18.patch
new file mode 100644
index 0000000..640f05f
--- /dev/null
+++ b/patches/glade-1-18.patch
@@ -0,0 +1,204 @@
+From e36e1ae6882d6e5345bcbf6f029f8239c4afd76f Mon Sep 17 00:00:00 2001
+From: Philip Chimento <philip chimento gmail com>
+Date: Fri, 10 Oct 2014 22:32:06 -0700
+Subject: [PATCH] style: Fix indentation of #ifdef block for OS X
+
+There are no tabs in the rest of the file, so this matches the
+surrounding indentation.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=738339
+---
+ src/glade-window.c | 60 +++++++++++++++++++++++++++---------------------------
+ 1 file changed, 30 insertions(+), 30 deletions(-)
+
+diff --git a/src/glade-window.c b/src/glade-window.c
+index 7349f3b..2fae4f6 100644
+--- a/src/glade-window.c
++++ b/src/glade-window.c
+@@ -3270,36 +3270,36 @@ glade_window_constructed (GObject *object)
+                     G_CALLBACK (clipboard_notify_handler_cb), window);
+   
+ #ifdef MAC_INTEGRATION
+-      {
+-        /* Fix up the menubar for MacOSX Quartz builds */
+-        GtkWidget *menubar = GET_OBJECT (builder, GTK_WIDGET, "menubar");
+-        GtkOSXApplication *theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
+-          GtkWidget *sep, *widget;
+-
+-        gtk_widget_hide (menubar);
+-        gtk_osxapplication_set_menu_bar(theApp, GTK_MENU_SHELL(menubar));
+-        widget = GET_OBJECT (builder, GTK_WIDGET, "quit_menuitem");
+-        gtk_widget_hide (widget);
+-        widget = GET_OBJECT (builder, GTK_WIDGET, "about_menuitem");
+-        gtk_osxapplication_insert_app_menu_item (theApp, widget, 0);
+-        sep = gtk_separator_menu_item_new();
+-        g_object_ref(sep);
+-        gtk_osxapplication_insert_app_menu_item (theApp, sep, 1);
+-
+-        widget = GET_OBJECT (builder, GTK_WIDGET, "properties_menuitem");
+-        gtk_osxapplication_insert_app_menu_item  (theApp, widget, 2);
+-        sep = gtk_separator_menu_item_new();
+-        g_object_ref(sep);
+-        gtk_osxapplication_insert_app_menu_item (theApp, sep, 3);
+-
+-        widget = GET_OBJECT (builder, GTK_WIDGET, "help_menuitem");
+-        gtk_osxapplication_set_help_menu(theApp, GTK_MENU_ITEM(widget));
+-
+-        g_signal_connect(theApp, "NSApplicationWillTerminate",
+-                         G_CALLBACK(on_quit_action_activate), window);
+-
+-        gtk_osxapplication_ready(theApp);
+-      }
++  {
++    /* Fix up the menubar for MacOSX Quartz builds */
++    GtkWidget *menubar = GET_OBJECT (builder, GTK_WIDGET, "menubar");
++    GtkOSXApplication *theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
++    GtkWidget *sep, *widget;
++
++    gtk_widget_hide (menubar);
++    gtk_osxapplication_set_menu_bar(theApp, GTK_MENU_SHELL(menubar));
++    widget = GET_OBJECT (builder, GTK_WIDGET, "quit_menuitem");
++    gtk_widget_hide (widget);
++    widget = GET_OBJECT (builder, GTK_WIDGET, "about_menuitem");
++    gtk_osxapplication_insert_app_menu_item (theApp, widget, 0);
++    sep = gtk_separator_menu_item_new();
++    g_object_ref(sep);
++    gtk_osxapplication_insert_app_menu_item (theApp, sep, 1);
++
++    widget = GET_OBJECT (builder, GTK_WIDGET, "properties_menuitem");
++    gtk_osxapplication_insert_app_menu_item  (theApp, widget, 2);
++    sep = gtk_separator_menu_item_new();
++    g_object_ref(sep);
++    gtk_osxapplication_insert_app_menu_item (theApp, sep, 3);
++
++    widget = GET_OBJECT (builder, GTK_WIDGET, "help_menuitem");
++    gtk_osxapplication_set_help_menu(theApp, GTK_MENU_ITEM(widget));
++
++    g_signal_connect(theApp, "NSApplicationWillTerminate",
++                     G_CALLBACK(on_quit_action_activate), window);
++
++    gtk_osxapplication_ready(theApp);
++  }
+ #endif
+ 
+   show_dock_first_time (window, DOCK_PALETTE, priv->dock_palette_action);
+-- 
+2.2.2
+
+From fc24963f93ea227ae6c627402166fa8184d6a51c Mon Sep 17 00:00:00 2001
+From: Philip Chimento <philip chimento gmail com>
+Date: Fri, 10 Oct 2014 22:35:24 -0700
+Subject: [PATCH] osx: Use current gtk-mac-integration API
+
+The #ifdef'd block did not compile at all because it used the old API
+from gtk-mac-integration, and because it used GtkBuilder when the
+surrounding code had been ported to use widget templates.
+
+This fixes up the use of the API and adds a few widget variables to
+GladeWindowPrivate which have to be bound to the template.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=738339
+---
+ configure.ac       |  2 +-
+ src/glade-window.c | 43 +++++++++++++++++++++++++------------------
+ 2 files changed, 26 insertions(+), 19 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c86e947..9792a54 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -263,7 +263,7 @@ dnl ================================================================
+ _gdk_tgt=`$PKG_CONFIG --variable=targets gdk-3.0`
+ AM_CONDITIONAL([GDK_TARGET_QUARTZ], [test x$_gdk_tgt = xquartz])
+ if test "x$_gdk_tgt" = xquartz; then 
+-   PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration)
++   PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration-gtk3)
+ 
+    GTK_MAC_BUNDLE_FLAG=
+ 
+diff --git a/src/glade-window.c b/src/glade-window.c
+index 2fae4f6..6dbfe62 100644
+--- a/src/glade-window.c
++++ b/src/glade-window.c
+@@ -136,11 +136,17 @@ struct _GladeWindowPrivate
+   GtkActionGroup *static_actiongroup;
+   GtkActionGroup *view_actiongroup;
+ 
++  GtkMenuShell *menubar;
+   GtkMenuShell *project_menu;
+   
+   GtkRecentManager *recent_manager;
+   GtkWidget *recent_menu;
+ 
++  GtkWidget *quit_menuitem;
++  GtkWidget *about_menuitem;
++  GtkWidget *properties_menuitem;
++  GtkMenuItem *help_menuitem;
++
+   gchar *default_path;          /* the default path for open/save operations */
+ 
+   GtkToolItem *undo_toolbutton; /* customized buttons for undo/redo with history */
+@@ -3272,33 +3278,29 @@ glade_window_constructed (GObject *object)
+ #ifdef MAC_INTEGRATION
+   {
+     /* Fix up the menubar for MacOSX Quartz builds */
+-    GtkWidget *menubar = GET_OBJECT (builder, GTK_WIDGET, "menubar");
+-    GtkOSXApplication *theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
+-    GtkWidget *sep, *widget;
+-
+-    gtk_widget_hide (menubar);
+-    gtk_osxapplication_set_menu_bar(theApp, GTK_MENU_SHELL(menubar));
+-    widget = GET_OBJECT (builder, GTK_WIDGET, "quit_menuitem");
+-    gtk_widget_hide (widget);
+-    widget = GET_OBJECT (builder, GTK_WIDGET, "about_menuitem");
+-    gtk_osxapplication_insert_app_menu_item (theApp, widget, 0);
++    GtkosxApplication *theApp = gtkosx_application_get ();
++    GtkWidget *sep;
++
++    gtk_widget_hide (priv->menubar);
++    gtkosx_application_set_menu_bar (theApp, priv->menubar);
++    gtk_widget_hide (priv->quit_menuitem);
++    gtkosx_application_insert_app_menu_item (theApp, priv->about_menuitem, 0);
+     sep = gtk_separator_menu_item_new();
+     g_object_ref(sep);
+-    gtk_osxapplication_insert_app_menu_item (theApp, sep, 1);
++    gtkosx_application_insert_app_menu_item (theApp, sep, 1);
+ 
+-    widget = GET_OBJECT (builder, GTK_WIDGET, "properties_menuitem");
+-    gtk_osxapplication_insert_app_menu_item  (theApp, widget, 2);
++    gtkosx_application_insert_app_menu_item (theApp, priv->properties_menuitem,
++                                             2);
+     sep = gtk_separator_menu_item_new();
+     g_object_ref(sep);
+-    gtk_osxapplication_insert_app_menu_item (theApp, sep, 3);
++    gtkosx_application_insert_app_menu_item (theApp, sep, 3);
+ 
+-    widget = GET_OBJECT (builder, GTK_WIDGET, "help_menuitem");
+-    gtk_osxapplication_set_help_menu(theApp, GTK_MENU_ITEM(widget));
++    gtkosx_application_set_help_menu (theApp, priv->help_menuitem);
+ 
+     g_signal_connect(theApp, "NSApplicationWillTerminate",
+                      G_CALLBACK(on_quit_action_activate), window);
+ 
+-    gtk_osxapplication_ready(theApp);
++    gtkosx_application_ready (theApp);
+   }
+ #endif
+ 
+@@ -3391,7 +3393,12 @@ glade_window_class_init (GladeWindowClass *klass)
+   gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, pointer_mode_actiongroup);
+   gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, static_actiongroup);
+   gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, view_actiongroup);
+-  
++  gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, menubar);
++  gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, quit_menuitem);
++  gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, properties_menuitem);
++  gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, about_menuitem);
++  gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, help_menuitem);
++
+   /* Actions */
+   gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, save_action);
+   gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, quit_action);
+-- 
+2.2.2
+


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