From 87a9ff607ba011815f80a7487492fc612c95af50 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sat, 30 Nov 2002 00:17:59 +0000 Subject: [PATCH] Removed obsolete menu from view_object. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@194 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/src/view-object.c | 75 -------------------------------------- glabels2/src/view-object.h | 2 - 2 files changed, 77 deletions(-) diff --git a/glabels2/src/view-object.c b/glabels2/src/view-object.c index db5a7cfc..0307042f 100644 --- a/glabels2/src/view-object.c +++ b/glabels2/src/view-object.c @@ -46,7 +46,6 @@ struct _glViewObjectPrivate { GnomeCanvasItem *group; glViewHighlight *highlight; - GtkWidget *menu; GtkWidget *property_dialog; }; @@ -65,8 +64,6 @@ static void gl_view_object_class_init (glViewObjectClass *klass); static void gl_view_object_instance_init (glViewObject *view_object); static void gl_view_object_finalize (GObject *object); -static GtkMenu *new_menu (glViewObject *view_object); - static void object_moved_cb (glLabelObject *object, gdouble x, gdouble y, @@ -153,7 +150,6 @@ gl_view_object_finalize (GObject *object) g_object_unref (GL_VIEW_OBJECT(object)->private->object); g_object_unref (G_OBJECT(GL_VIEW_OBJECT(object)->private->highlight)); gtk_object_destroy (GTK_OBJECT(GL_VIEW_OBJECT(object)->private->group)); - gtk_object_destroy (GTK_OBJECT(GL_VIEW_OBJECT(object)->private->menu)); if (GL_VIEW_OBJECT(object)->private->property_dialog) { gtk_object_destroy (GTK_OBJECT(GL_VIEW_OBJECT(object)->private->property_dialog)); } @@ -233,8 +229,6 @@ gl_view_object_set_object (glViewObject *view_object, view_object->private->highlight = GL_VIEW_HIGHLIGHT (gl_view_highlight_new (view_object, style)); - view_object->private->menu = GTK_WIDGET(new_menu (view_object)); - g_signal_connect (G_OBJECT (object), "moved", G_CALLBACK (object_moved_cb), view_object); @@ -355,21 +349,6 @@ gl_view_object_get_dialog (glViewObject *view_object) return view_object->private->property_dialog; } -/*****************************************************************************/ -/* Popup menu for this object. */ -/*****************************************************************************/ -GtkMenu * -gl_view_object_get_menu (glViewObject *view_object) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object), NULL); - - gl_debug (DEBUG_VIEW, "END"); - - return GTK_MENU(view_object->private->menu); -} - /*****************************************************************************/ /* Highlight view of object. */ /*****************************************************************************/ @@ -403,60 +382,6 @@ gl_view_object_hide_highlight (glViewObject *view_object) } -/*---------------------------------------------------------------------------*/ -/* Create a popup menu for this object view. */ -/*---------------------------------------------------------------------------*/ -static GtkMenu * -new_menu (glViewObject *view_object) -{ - GtkWidget *menu, *menuitem; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view_object && GL_VIEW_OBJECT(view_object), NULL); - - menu = gtk_menu_new (); - - menuitem = gtk_menu_item_new_with_label (_("Edit properties...")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); - gtk_widget_show (menuitem); - g_signal_connect_swapped (G_OBJECT (menuitem), "activate", - G_CALLBACK (gl_view_object_show_dialog), - view_object); - - menuitem = gtk_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); - gtk_widget_show (menuitem); - - menuitem = gtk_menu_item_new_with_label (_("Delete")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); - gtk_widget_show (menuitem); - g_signal_connect_swapped (G_OBJECT (menuitem), "activate", - G_CALLBACK (g_object_unref), view_object); - - menuitem = gtk_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); - gtk_widget_show (menuitem); - - menuitem = gtk_menu_item_new_with_label (_("Bring to front")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); - gtk_widget_show (menuitem); - g_signal_connect_swapped (G_OBJECT (menuitem), "activate", - G_CALLBACK (gl_label_object_raise_to_top), - view_object->private->object); - - menuitem = gtk_menu_item_new_with_label (_("Send to back")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); - gtk_widget_show (menuitem); - g_signal_connect_swapped (G_OBJECT (menuitem), "activate", - G_CALLBACK (gl_label_object_lower_to_bottom), - view_object->private->object); - - gl_debug (DEBUG_VIEW, "END"); - - return GTK_MENU(menu); -} - /*****************************************************************************/ /* Show property dialog. */ /*****************************************************************************/ diff --git a/glabels2/src/view-object.h b/glabels2/src/view-object.h index f1134a13..399f8a01 100644 --- a/glabels2/src/view-object.h +++ b/glabels2/src/view-object.h @@ -85,8 +85,6 @@ GnomeCanvasItem *gl_view_object_item_new (glViewObject *view_ob const gchar *first_arg_name, ...); -GtkMenu *gl_view_object_get_menu (glViewObject *view_object); - void gl_view_object_show_highlight (glViewObject *view_object); void gl_view_object_hide_highlight (glViewObject *view_object); -- 2.39.5