]> git.sur5r.net Git - glabels/commitdiff
Removed obsolete menu from view_object.
authorJim Evins <evins@snaught.com>
Sat, 30 Nov 2002 00:17:59 +0000 (00:17 +0000)
committerJim Evins <evins@snaught.com>
Sat, 30 Nov 2002 00:17:59 +0000 (00:17 +0000)
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@194 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/src/view-object.c
glabels2/src/view-object.h

index db5a7cfced9985f2c8387abf4343fb0b1234c3c3..0307042f3e4536fcf04b7e6ea6ac47ed15344946 100644 (file)
@@ -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.                                                     */
 /*****************************************************************************/
index f1134a13ddac1a0a88e22fc70d4543134ace8ee5..399f8a01d669e1ebe0ae55994e3690b10b640dd0 100644 (file)
@@ -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);