[gtk+] Rename gtkquartz-menu to gtkmodelmenu-quartz
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Rename gtkquartz-menu to gtkmodelmenu-quartz
- Date: Mon, 7 May 2012 21:59:47 +0000 (UTC)
commit b5bcdbc10fe230474826d93b8999aede79405020
Author: John Ralls <jralls ceridwen us>
Date: Sat May 5 13:11:10 2012 -0700
Rename gtkquartz-menu to gtkmodelmenu-quartz
Makes name consistent with other quartz-only modules and makes it clear that this works with the GMenuModel system rather than the older GtkMenu system.
gtk/Makefile.am | 5 ++---
gtk/gtkapplication.c | 2 +-
gtk/{gtkquartz-menu.c => gtkmodelmenu-quartz.c} | 18 +++++++++---------
gtk/{gtkquartz-menu.h => gtkmodelmenu-quartz.h} | 6 +++---
4 files changed, 15 insertions(+), 16 deletions(-)
---
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index e31feb2..1ba1a38 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -907,8 +907,7 @@ gtk_use_win32_c_sources = \
gtk_use_quartz_c_sources = \
gtksearchenginequartz.c \
gtkmountoperation-stub.c \
- gtkquartz-menu.h \
- gtkquartz-menu.c \
+ gtkmodelmenu-quartz.c \
gtkquartz.c
gtk_use_stub_c_sources = \
gtkmountoperation-stub.c
@@ -929,7 +928,7 @@ else
if USE_QUARTZ
gtk_private_h_sources += \
gtksearchenginequartz.h \
- gtkmenuquartz.h \
+ gtkmodelmenu-quartz.h \
gtkquartz.h
gtk_c_sources += $(gtk_use_quartz_c_sources)
libgtk_3_la_CFLAGS = "-xobjective-c"
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 33a1b61..24a580a 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -37,7 +37,7 @@
#include "gtkintl.h"
#ifdef GDK_WINDOWING_QUARTZ
-#include "gtkquartz-menu.h"
+#include "gtkmodelmenu-quartz.h"
#import <Cocoa/Cocoa.h>
#include <Carbon/Carbon.h>
#include "gtkmessagedialog.h"
diff --git a/gtk/gtkquartz-menu.c b/gtk/gtkmodelmenu-quartz.c
similarity index 97%
rename from gtk/gtkquartz-menu.c
rename to gtk/gtkmodelmenu-quartz.c
index 89619cd..c85cbb8 100644
--- a/gtk/gtkquartz-menu.c
+++ b/gtk/gtkmodelmenu-quartz.c
@@ -18,7 +18,7 @@
* Ryan Lortie <desrt desrt ca>
*/
-#include "gtkquartz-menu.h"
+#include "gtkmodelmenu-quartz.h"
#include <gdk/gdkkeysyms.h>
#include "gtkaccelmapprivate.h"
@@ -31,7 +31,7 @@
* Copyright (C) 2009 Paul Davis
*/
static unichar
-gtk_quartz_menu_get_unichar (gint key)
+gtk_quartz_model_menu_get_unichar (gint key)
{
if (key >= GDK_KEY_A && key <= GDK_KEY_Z)
return key + (GDK_KEY_a - GDK_KEY_A);
@@ -310,7 +310,7 @@ gtk_quartz_action_observer_new (GNSMenuItem *item)
}
static gboolean
-gtk_quartz_menu_handle_changes (gpointer user_data)
+gtk_quartz_model_menu_handle_changes (gpointer user_data)
{
GNSMenu *menu = user_data;
@@ -318,7 +318,7 @@ gtk_quartz_menu_handle_changes (gpointer user_data)
}
static void
-gtk_quartz_menu_items_changed (GMenuModel *model,
+gtk_quartz_model_menu_items_changed (GMenuModel *model,
gint position,
gint removed,
gint added,
@@ -349,7 +349,7 @@ gtk_quartz_set_main_menu (GMenuModel *model,
- (void)model:(GMenuModel *)model didChangeAtPosition:(NSInteger)position removed:(NSInteger)removed added:(NSInteger)added
{
if (update_idle == 0)
- update_idle = gdk_threads_add_idle (gtk_quartz_menu_handle_changes, self);
+ update_idle = gdk_threads_add_idle (gtk_quartz_model_menu_handle_changes, self);
}
- (void)appendItemFromModel:(GMenuModel *)aModel atIndex:(gint)index withHeading:(gchar **)heading
@@ -370,7 +370,7 @@ gtk_quartz_set_main_menu (GMenuModel *model,
{
gint n, i;
- g_signal_connect (aModel, "items-changed", G_CALLBACK (gtk_quartz_menu_items_changed), self);
+ g_signal_connect (aModel, "items-changed", G_CALLBACK (gtk_quartz_model_menu_items_changed), self);
connected = g_slist_prepend (connected, g_object_ref (aModel));
n = g_menu_model_get_n_items (aModel);
@@ -414,7 +414,7 @@ gtk_quartz_set_main_menu (GMenuModel *model,
{
while (connected)
{
- g_signal_handlers_disconnect_by_func (connected->data, gtk_quartz_menu_items_changed, self);
+ g_signal_handlers_disconnect_by_func (connected->data, gtk_quartz_model_menu_items_changed, self);
g_object_unref (connected->data);
connected = g_slist_delete_link (connected, connected);
@@ -447,7 +447,7 @@ gtk_quartz_set_main_menu (GMenuModel *model,
{
while (connected)
{
- g_signal_handlers_disconnect_by_func (connected->data, gtk_quartz_menu_items_changed, self);
+ g_signal_handlers_disconnect_by_func (connected->data, gtk_quartz_model_menu_items_changed, self);
g_object_unref (connected->data);
connected = g_slist_delete_link (connected, connected);
@@ -511,7 +511,7 @@ gtk_quartz_set_main_menu (GMenuModel *model,
path = _gtk_accel_path_for_action (action, target);
if (gtk_accel_map_lookup_entry (path, &key))
{
- unichar character = gtk_quartz_menu_get_unichar (key.accel_key);
+ unichar character = gtk_quartz_model_menu_get_unichar (key.accel_key);
if (character)
{
diff --git a/gtk/gtkquartz-menu.h b/gtk/gtkmodelmenu-quartz.h
similarity index 89%
rename from gtk/gtkquartz-menu.h
rename to gtk/gtkmodelmenu-quartz.h
index 32ef331..93d83e5 100644
--- a/gtk/gtkquartz-menu.h
+++ b/gtk/gtkmodelmenu-quartz.h
@@ -17,12 +17,12 @@
* Author: William Hua <william attente ca>
*/
-#ifndef __GTK_QUARTZ_MENU_H__
-#define __GTK_QUARTZ_MENU_H__
+#ifndef __GTK_MODELMENU_QUARTZ_H__
+#define __GTK_MODELMENU_QUARTZ_H__
#include "gactionobservable.h"
void gtk_quartz_set_main_menu (GMenuModel *model,
GActionObservable *observable);
-#endif /* __GTK_QUARTZ_MENU_H__ */
+#endif /* __GTK_MODELMENU_QUARTZ_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]