mirror of
https://github.com/brl/mutter.git
synced 2025-07-24 10:28:02 +00:00
menu: Remove support for icon items from the window menu
We don't show these by default, and it uses deprecated API. This also removes our only use of the stock icons, so remove those as well. https://bugzilla.gnome.org/show_bug.cgi?id=704437
This commit is contained in:
48
src/ui/ui.c
48
src/ui/ui.c
@@ -4,7 +4,6 @@
|
||||
|
||||
/*
|
||||
* Copyright (C) 2002 Havoc Pennington
|
||||
* stock icon code Copyright (C) 2002 Jorn Baayen <jorn@nl.linux.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -31,13 +30,10 @@
|
||||
#include "core.h"
|
||||
#include "theme-private.h"
|
||||
|
||||
#include "inlinepixbufs.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <cairo-xlib.h>
|
||||
|
||||
static void meta_stock_icons_init (void);
|
||||
static void meta_ui_accelerator_parse (const char *accel,
|
||||
guint *keysym,
|
||||
guint *keycode,
|
||||
@@ -62,8 +58,6 @@ meta_ui_init (void)
|
||||
{
|
||||
if (!gtk_init_check (NULL, NULL))
|
||||
meta_fatal ("Unable to open X display %s\n", XDisplayName (NULL));
|
||||
|
||||
meta_stock_icons_init ();
|
||||
}
|
||||
|
||||
Display*
|
||||
@@ -998,48 +992,6 @@ meta_ui_window_is_widget (MetaUI *ui,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* stock icon code Copyright (C) 2002 Jorn Baayen <jorn@nl.linux.org> */
|
||||
typedef struct
|
||||
{
|
||||
char *stock_id;
|
||||
const guint8 *icon_data;
|
||||
} MetaStockIcon;
|
||||
|
||||
static void
|
||||
meta_stock_icons_init (void)
|
||||
{
|
||||
GtkIconFactory *factory;
|
||||
int i;
|
||||
|
||||
MetaStockIcon items[] =
|
||||
{
|
||||
{ METACITY_STOCK_DELETE, stock_delete_data },
|
||||
{ METACITY_STOCK_MINIMIZE, stock_minimize_data },
|
||||
{ METACITY_STOCK_MAXIMIZE, stock_maximize_data }
|
||||
};
|
||||
|
||||
factory = gtk_icon_factory_new ();
|
||||
gtk_icon_factory_add_default (factory);
|
||||
|
||||
for (i = 0; i < (gint) G_N_ELEMENTS (items); i++)
|
||||
{
|
||||
GtkIconSet *icon_set;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_inline (-1, items[i].icon_data,
|
||||
FALSE,
|
||||
NULL);
|
||||
|
||||
icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
|
||||
gtk_icon_factory_add (factory, items[i].stock_id, icon_set);
|
||||
gtk_icon_set_unref (icon_set);
|
||||
|
||||
g_object_unref (G_OBJECT (pixbuf));
|
||||
}
|
||||
|
||||
g_object_unref (G_OBJECT (factory));
|
||||
}
|
||||
|
||||
int
|
||||
meta_ui_get_drag_threshold (MetaUI *ui)
|
||||
{
|
||||
|
Reference in New Issue
Block a user