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.
This commit is contained in:
John Ralls 2012-05-05 13:11:10 -07:00
parent e00847b0d5
commit b5bcdbc10f
4 changed files with 15 additions and 16 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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)
{

View File

@ -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__ */