[metacity] remove last use of custom icons



commit d7080c75a420f922d7dbe8a0cf8b060970e70ca0
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Oct 8 23:10:42 2014 +0300

    remove last use of custom icons

 configure.ac        |    8 --------
 src/Makefile.am     |   12 ++----------
 src/mini-window.png |  Bin 345 -> 0 bytes
 src/ui/menu.c       |   44 +++++++++++++++++++++-----------------------
 src/ui/ui.c         |   15 ++++++++-------
 src/window.png      |  Bin 548 -> 0 bytes
 6 files changed, 31 insertions(+), 48 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1882648..cd3645d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -473,14 +473,6 @@ AM_CONDITIONAL(HAVE_SM, test "$found_sm" = "yes")
 HOST_ALIAS=$host_alias
 AC_SUBST(HOST_ALIAS)
 
-AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
-
-if test x"$GDK_PIXBUF_CSOURCE" = xno; then
-  AC_MSG_ERROR([gdk-pixbuf-csource executable not found in your path - should be installed with GTK])
-fi
-
-AC_SUBST(GDK_PIXBUF_CSOURCE)
-
 AC_PATH_PROG(ZENITY, zenity, no)
 if test x"$ZENITY" = xno; then
   AC_MSG_ERROR([zenity not found in your path - needed for dialogs])
diff --git a/src/Makefile.am b/src/Makefile.am
index 932f707..ad9b2b9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -79,7 +79,6 @@ metacity_SOURCES=                             \
        include/common.h                        \
        include/core.h                          \
        include/ui.h                            \
-       inlinepixbufs.h                         \
        ui/fixedtip.c                           \
        ui/fixedtip.h                           \
        ui/frames.c                             \
@@ -186,15 +185,8 @@ xml_DATA     = $(xml_in_files:.xml.in=.xml)
 
 @INTLTOOL_SCHEMAS_RULE@
 
-IMAGES=window.png mini-window.png
-VARIABLES=mini_window_data $(srcdir)/mini-window.png \
-          window_data $(srcdir)/window.png
-
-BUILT_SOURCES = inlinepixbufs.h
-CLEANFILES = inlinepixbufs.h metacity.desktop metacity-wm.desktop org.gnome.metacity.gschema.xml 
50-metacity-launchers.xml 50-metacity-navigation.xml 50-metacity-screenshot.xml 50-metacity-system.xml 
50-metacity-windows.xml
-
-inlinepixbufs.h: $(IMAGES)
-       $(AM_V_GEN)$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h
+CLEANFILES = \
+       metacity.desktop metacity-wm.desktop org.gnome.metacity.gschema.xml 50-metacity-launchers.xml 
50-metacity-navigation.xml 50-metacity-screenshot.xml 50-metacity-system.xml 50-metacity-windows.xml
 
 pkgconfigdir = $(libdir)/pkgconfig
 
diff --git a/src/ui/menu.c b/src/ui/menu.c
index c19a5c6..0aace54 100644
--- a/src/ui/menu.c
+++ b/src/ui/menu.c
@@ -47,7 +47,6 @@ struct _MenuItem
 {
   MetaMenuOp op;
   MetaMenuItemType type;
-  const char *stock_id;
   const gboolean checked;
   const char *label;
 };
@@ -63,42 +62,42 @@ static void activate_cb (GtkWidget *menuitem, gpointer data);
 
 static MenuItem menuitems[] = {
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_MINIMIZE, MENU_ITEM_NORMAL, NULL, FALSE, N_("Mi_nimize") },
+  { META_MENU_OP_MINIMIZE, MENU_ITEM_NORMAL, FALSE, N_("Mi_nimize") },
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_MAXIMIZE, MENU_ITEM_NORMAL, NULL, FALSE, N_("Ma_ximize") },
+  { META_MENU_OP_MAXIMIZE, MENU_ITEM_NORMAL, FALSE, N_("Ma_ximize") },
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_UNMAXIMIZE, MENU_ITEM_NORMAL, NULL, FALSE, N_("Unma_ximize") },
+  { META_MENU_OP_UNMAXIMIZE, MENU_ITEM_NORMAL, FALSE, N_("Unma_ximize") },
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_SHADE, MENU_ITEM_NORMAL, NULL, FALSE, N_("Roll _Up") },
+  { META_MENU_OP_SHADE, MENU_ITEM_NORMAL, FALSE, N_("Roll _Up") },
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_UNSHADE, MENU_ITEM_NORMAL, NULL, FALSE, N_("_Unroll") },
+  { META_MENU_OP_UNSHADE, MENU_ITEM_NORMAL, FALSE, N_("_Unroll") },
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_MOVE, MENU_ITEM_NORMAL, NULL, FALSE, N_("_Move") },
+  { META_MENU_OP_MOVE, MENU_ITEM_NORMAL, FALSE, N_("_Move") },
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_RESIZE, MENU_ITEM_NORMAL, NULL, FALSE, N_("_Resize") },
+  { META_MENU_OP_RESIZE, MENU_ITEM_NORMAL, FALSE, N_("_Resize") },
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_RECOVER, MENU_ITEM_NORMAL, NULL, FALSE, N_("Move Titlebar On_screen") },
-  { META_MENU_OP_WORKSPACES, MENU_ITEM_SEPARATOR, NULL, FALSE, NULL }, /* separator */
+  { META_MENU_OP_RECOVER, MENU_ITEM_NORMAL, FALSE, N_("Move Titlebar On_screen") },
+  { META_MENU_OP_WORKSPACES, MENU_ITEM_SEPARATOR, FALSE, NULL }, /* separator */
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_ABOVE, MENU_ITEM_CHECKBOX, NULL, FALSE, N_("Always on _Top") },
+  { META_MENU_OP_ABOVE, MENU_ITEM_CHECKBOX, FALSE, N_("Always on _Top") },
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_UNABOVE, MENU_ITEM_CHECKBOX, NULL, TRUE, N_("Always on _Top") },
+  { META_MENU_OP_UNABOVE, MENU_ITEM_CHECKBOX, TRUE, N_("Always on _Top") },
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_STICK, MENU_ITEM_RADIOBUTTON, NULL, FALSE, N_("_Always on Visible Workspace") },
+  { META_MENU_OP_STICK, MENU_ITEM_RADIOBUTTON, FALSE, N_("_Always on Visible Workspace") },
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_UNSTICK, MENU_ITEM_RADIOBUTTON, NULL, FALSE,  N_("_Only on This Workspace") },
+  { META_MENU_OP_UNSTICK, MENU_ITEM_RADIOBUTTON, FALSE,  N_("_Only on This Workspace") },
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_MOVE_LEFT, MENU_ITEM_NORMAL, NULL, FALSE, N_("Move to Workspace _Left") },
+  { META_MENU_OP_MOVE_LEFT, MENU_ITEM_NORMAL, FALSE, N_("Move to Workspace _Left") },
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_MOVE_RIGHT, MENU_ITEM_NORMAL, NULL, FALSE, N_("Move to Workspace R_ight") },
+  { META_MENU_OP_MOVE_RIGHT, MENU_ITEM_NORMAL, FALSE, N_("Move to Workspace R_ight") },
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_MOVE_UP, MENU_ITEM_NORMAL, NULL, FALSE, N_("Move to Workspace _Up") },
+  { META_MENU_OP_MOVE_UP, MENU_ITEM_NORMAL, FALSE, N_("Move to Workspace _Up") },
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_MOVE_DOWN, MENU_ITEM_NORMAL, NULL, FALSE, N_("Move to Workspace _Down") },
-  { 0, MENU_ITEM_WORKSPACE_LIST, NULL, FALSE, NULL },
-  { 0, MENU_ITEM_SEPARATOR, NULL, FALSE, NULL }, /* separator */
+  { META_MENU_OP_MOVE_DOWN, MENU_ITEM_NORMAL, FALSE, N_("Move to Workspace _Down") },
+  { 0, MENU_ITEM_WORKSPACE_LIST, FALSE, NULL },
+  { 0, MENU_ITEM_SEPARATOR, FALSE, NULL }, /* separator */
   /* Translators: Translate this string the same way as you do in libwnck! */
-  { META_MENU_OP_DELETE, MENU_ITEM_NORMAL, NULL, FALSE, N_("_Close") }
+  { META_MENU_OP_DELETE, MENU_ITEM_NORMAL, FALSE, N_("_Close") }
 };
 
 static void
@@ -379,8 +378,7 @@ meta_window_menu_new   (MetaFrames         *frames,
                   int j;
 
                   MenuItem to_another_workspace = {
-                    0, MENU_ITEM_NORMAL,
-                    NULL, FALSE,
+                    0, MENU_ITEM_NORMAL, FALSE,
                     N_("Move to Another _Workspace")
                   };
 
diff --git a/src/ui/ui.c b/src/ui/ui.c
index 2614826..015a44f 100644
--- a/src/ui/ui.c
+++ b/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
@@ -28,8 +27,6 @@
 #include "core.h"
 #include "theme.h"
 
-#include "inlinepixbufs.h"
-
 #include <string.h>
 #include <stdlib.h>
 #include <cairo-xlib.h>
@@ -598,8 +595,10 @@ meta_ui_get_default_window_icon (MetaUI *ui)
                                                    0,
                                                    NULL);
       else
-        default_icon = gdk_pixbuf_new_from_inline (-1, window_data,
-                                                   FALSE,
+          default_icon = gtk_icon_theme_load_icon (theme,
+                                                   "gtk-missing-image",
+                                                   META_ICON_WIDTH,
+                                                   0,
                                                    NULL);
 
       g_assert (default_icon);
@@ -631,8 +630,10 @@ meta_ui_get_default_mini_icon (MetaUI *ui)
                                                    0,
                                                    NULL);
       else
-        default_icon = gdk_pixbuf_new_from_inline (-1, mini_window_data,
-                                                   FALSE,
+          default_icon = gtk_icon_theme_load_icon (theme,
+                                                   "gtk-missing-image",
+                                                   META_MINI_ICON_WIDTH,
+                                                   0,
                                                    NULL);
 
       g_assert (default_icon);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]