[gtk-osx] Fix up Glade so that it builds.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-osx] Fix up Glade so that it builds.
- Date: Mon, 4 Aug 2014 00:48:02 +0000 (UTC)
commit e7b064540025d16e99aacf975f4ca803501e15ba
Author: John Ralls <jralls ceridwen us>
Date: Sun Aug 3 16:35:31 2014 -0700
Fix up Glade so that it builds.
Unfortunately this loses the Mac menu customization.
modulesets-stable/gtk-osx-random.modules | 16 +++-
patches/glade-3_16_1.patch | 157 ++++++++++++++++++++++++++++++
2 files changed, 170 insertions(+), 3 deletions(-)
---
diff --git a/modulesets-stable/gtk-osx-random.modules b/modulesets-stable/gtk-osx-random.modules
index 5d54a65..33dcfd1 100644
--- a/modulesets-stable/gtk-osx-random.modules
+++ b/modulesets-stable/gtk-osx-random.modules
@@ -28,6 +28,8 @@
href="git://git.gnome.org/"/>
<repository type="tarball" name="boehm"
href="http://www.hboehm.info/"/>
+ <repository type="tarball" name="itstool"
+ href="http://files.itstool.org/"/>
<metamodule id="meta-gtk-osx-random">
<dependencies>
@@ -134,6 +136,11 @@ Libglade itself is deprecated. This is the last release. -->
</dependencies>
</autotools>
+ <autotools id="itstool" autogen-sh='configure'>
+ <branch module="itstool/itstool-2.0.2.tar.bz2" version="2.0.2"
+ repo="itstool"/>
+ </autotools>
+
<!-- Glade 3.8 is the last stable series for Gtk+-2 -->
<autotools id="glade3" autogen-sh="configure"
autogenargs="--disable-scrollkeeper">
@@ -152,10 +159,13 @@ Libglade itself is deprecated. This is the last release. -->
change back to just "glade"-->
<autotools id="glade" autogen-sh="configure"
autogenargs="--disable-scrollkeeper">
- <branch module="glade/3.14/glade-3.14.1.tar.xz" version="3.14.1"
- hash="sha256:8484b62c7a4579ea3e5d98200b397a1baf0b621c0b0c70242ee1dbbe449eae20">
- <patch
file="http://git.gnome.org/browse/gtk-osx/plain/patches/Glade-master-Mac-Integration-Fix-up-menu-accelerators-for-Mac.patch"
strip="1"/>
+ <branch module="glade/3.16/glade-3.16.1.tar.xz" version="3.16.1"
+ hash="sha256:994ac258bc100d3907ed40a2880c3144f13997b324477253e812d59f2716523f">
+ <patch file="http://git.gnome.org/browse/gtk-osx/plain/patches/glade-3_16_1.patch" strip="1"/>
</branch>
+ <dependencies>
+ <dep package="itstool"/>
+ </dependencies>
<after>
<dep package="meta-gtk-osx-bootstrap"/>
<dep package="meta-gtk-osx-themes"/>
diff --git a/patches/glade-3_16_1.patch b/patches/glade-3_16_1.patch
new file mode 100644
index 0000000..db428e5
--- /dev/null
+++ b/patches/glade-3_16_1.patch
@@ -0,0 +1,157 @@
+--- a/gladeui/glade-command.c Wed Dec 18 07:00:38 2013
++++ b/gladeui/glade-command.c Sun Aug 3 14:37:06 2014
+@@ -866,7 +866,7 @@
+
+ multiple = g_list_length (me->sdata) > 1;
+ if (multiple)
+- glade_command_push_group (cmd->priv->description);
++ glade_command_push_group ("%s", cmd->priv->description);
+
+ glade_command_check_group (GLADE_COMMAND (me));
+
+
+--- a/gladeui/glade-command.h Wed Dec 18 07:00:38 2013
++++ b/gladeui/glade-command.h Sun Aug 3 14:34:49 2014
+@@ -66,7 +66,7 @@
+ GType glade_command_get_type (void);
+
+ void glade_command_push_group (const gchar *fmt,
+- ...);
++ ...) __attribute__((format(printf, 1, 2)));
+ void glade_command_pop_group (void);
+ gint glade_command_get_group_depth (void);
+
+
+--- a/gladeui/glade-editor-property.c Tue Nov 26 22:38:58 2013
++++ b/gladeui/glade-editor-property.c Sun Aug 3 14:55:12 2014
+@@ -3029,16 +3029,12 @@
+ return view_widget;
+ }
+
+-
+ static gchar *
+-glade_eprop_object_dialog_title (GladeEditorProperty *eprop)
++select_dialog_title_format (GladeEditorProperty *eprop, gchar *format) G_GNUC_FORMAT (2);
++static gchar *
++select_dialog_title_format (GladeEditorProperty *eprop, gchar *format)
+ {
+- GladeWidgetAdaptor *adaptor;
+- GParamSpec *pspec;
+- const gchar *format;
+-
+- pspec = glade_property_class_get_pspec (eprop->priv->klass);
+-
++ GParamSpec *pspec = glade_property_class_get_pspec (eprop->priv->klass);
+ if (glade_property_class_parentless_widget (eprop->priv->klass))
+ format = GLADE_IS_PARAM_SPEC_OBJECTS (pspec) ?
+ _("Choose parentless %s type objects in this project") :
+@@ -3048,18 +3044,32 @@
+ _("Choose %s type objects in this project") :
+ _("Choose a %s in this project");
+
++ return format;
++}
++
++static gchar *
++glade_eprop_object_dialog_title (GladeEditorProperty *eprop)
++{
++ GladeWidgetAdaptor *adaptor;
++ GParamSpec *pspec;
++
++ pspec = glade_property_class_get_pspec (eprop->priv->klass);
++
+ if (GLADE_IS_PARAM_SPEC_OBJECTS (pspec))
+- return g_strdup_printf (format, g_type_name
++ return g_strdup_printf (select_dialog_title_format (eprop, "%s"),
++ g_type_name
+ (glade_param_spec_objects_get_type
+ (GLADE_PARAM_SPEC_OBJECTS (pspec))));
+ else if ((adaptor =
+ glade_widget_adaptor_get_by_type (pspec->value_type)) != NULL)
+- return g_strdup_printf (format, glade_widget_adaptor_get_title (adaptor));
++ return g_strdup_printf (select_dialog_title_format (eprop, "%s"),
++ glade_widget_adaptor_get_title (adaptor));
+
+ /* Fallback on type name (which would look like "GtkButton"
+ * instead of "Button" and maybe not translated).
+ */
+- return g_strdup_printf (format, g_type_name (pspec->value_type));
++ return g_strdup_printf (select_dialog_title_format (eprop, "%s"),
++ g_type_name (pspec->value_type));
+ }
+
+
+
+--- a/gladeui/glade-project.c Wed Dec 18 07:00:38 2013
++++ b/gladeui/glade-project.c Sun Aug 3 15:26:38 2014
+@@ -1871,7 +1871,7 @@
+
+ if (message)
+ {
+- glade_util_ui_message (glade_app_get_window (), GLADE_UI_ERROR, NULL, message);
++ glade_util_ui_message (glade_app_get_window (), GLADE_UI_ERROR, NULL, "%s", message);
+ g_free (message);
+ }
+ else
+
+--- a/gladeui/glade-utils.h Tue Nov 26 22:38:58 2013
++++ b/gladeui/glade-utils.h Sun Aug 3 15:24:32 2014
+@@ -28,11 +28,13 @@
+ gboolean glade_util_ui_message (GtkWidget *parent,
+ GladeUIMessageType type,
+ GtkWidget *widget,
+- const gchar *format, ...);
++ const gchar *format, ...)
++ __attribute__((format(printf, 4, 5)));
+
+ void glade_util_flash_message (GtkWidget *statusbar,
+ guint context_id,
+- gchar *format, ...);
++ gchar *format, ...)
++ __attribute__((format(printf, 3, 4)));
+ gboolean glade_util_url_show (const gchar *url);
+ GtkWidget *glade_util_file_dialog_new (const gchar *title,
+ GladeProject *project,
+
+--- a/src/glade-window.c Wed Dec 18 07:00:38 2013
++++ b/src/glade-window.c Sun Aug 3 16:16:22 2014
+@@ -3244,38 +3244,6 @@
+ "notify::has-selection",
+ 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);
+- }
+-#endif
+
+ show_dock_first_time (window, DOCK_PALETTE, priv->dock_palette_action);
+ show_dock_first_time (window, DOCK_INSPECTOR, priv->dock_inspector_action);
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]