summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/menu.c19
-rw-r--r--src/ui/tabpopup.c12
2 files changed, 25 insertions, 6 deletions
diff --git a/src/ui/menu.c b/src/ui/menu.c
index aeba64fa..90db5f1e 100644
--- a/src/ui/menu.c
+++ b/src/ui/menu.c
@@ -100,6 +100,21 @@ static MenuItem menuitems[] = {
{META_MENU_OP_DELETE, MENU_ITEM_IMAGE, MARCO_STOCK_DELETE, FALSE, N_("_Close")}
};
+static void
+sn_menu_data_free (MenuData *menu_data,
+ GClosure *closure)
+{
+ g_free (menu_data->menu);
+ g_free (menu_data);
+}
+
+static void
+sn_menu_item_free (MenuItem *menu_item,
+ GClosure *closure)
+{
+ g_free (menu_item);
+}
+
static void popup_position_func(GtkMenu* menu, gint* x, gint* y, gboolean* push_in, gpointer user_data)
{
GtkRequisition req;
@@ -442,7 +457,7 @@ meta_window_menu_new (MetaFrames *frames,
"activate",
G_CALLBACK (activate_cb),
md,
- (GClosureNotify) g_free, 0);
+ (GClosureNotify) sn_menu_data_free, 0);
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), submi);
@@ -469,7 +484,7 @@ meta_window_menu_new (MetaFrames *frames,
"activate",
G_CALLBACK (activate_cb),
md,
- (GClosureNotify) g_free, 0);
+ (GClosureNotify) sn_menu_item_free, 0);
}
if (mi)
diff --git a/src/ui/tabpopup.c b/src/ui/tabpopup.c
index 37231a5b..10c7898f 100644
--- a/src/ui/tabpopup.c
+++ b/src/ui/tabpopup.c
@@ -636,7 +636,9 @@ unselect_image (GtkWidget *widget)
gtk_widget_queue_draw (widget);
}
-static void meta_select_image_class_init (MetaSelectImageClass *klass);
+static void meta_select_image_class_init (MetaSelectImageClass *klass,
+ void *data);
+
static gboolean meta_select_image_draw (GtkWidget *widget,
cairo_t *cr);
@@ -669,7 +671,7 @@ meta_select_image_get_type (void)
}
static void
-meta_select_image_class_init (MetaSelectImageClass *klass)
+meta_select_image_class_init (MetaSelectImageClass *klass, void *data)
{
GtkWidgetClass *widget_class;
@@ -805,7 +807,8 @@ unselect_workspace (GtkWidget *widget)
gtk_widget_queue_draw (widget);
}
-static void meta_select_workspace_class_init (MetaSelectWorkspaceClass *klass);
+static void meta_select_workspace_class_init (MetaSelectWorkspaceClass *klass,
+ void *data);
static gboolean meta_select_workspace_draw (GtkWidget *widget,
cairo_t *cr);
@@ -840,7 +843,8 @@ meta_select_workspace_get_type (void)
}
static void
-meta_select_workspace_class_init (MetaSelectWorkspaceClass *klass)
+meta_select_workspace_class_init (MetaSelectWorkspaceClass *klass,
+ void *data)
{
GtkWidgetClass *widget_class;