public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Takao Fujiwara <tfujiwar@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/ibus] autotool: Added gnome-icon-theme-legacy dependency at the moment.
Date: Sun, 31 May 2026 02:05:04 GMT	[thread overview]
Message-ID: <178019310415.1.3737292076617324520.rpms-ibus-0e99b9268d1d@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/ibus
Branch : autotool
Commit : 0e99b9268d1ddf9e5115259ba2db0b578346cb9c
Author : Takao Fujiwara <tfujiwar@redhat.com>
Date   : 2011-02-18T11:32:43+09:00
Stats  : +10/-146 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/ibus/c/0e99b9268d1ddf9e5115259ba2db0b578346cb9c?branch=autotool

Log:
Added gnome-icon-theme-legacy dependency at the moment.

---
diff --git a/ibus-xx-gtk-legacy-icon.patch b/ibus-xx-gtk-legacy-icon.patch
deleted file mode 100644
index 22b354f..0000000
--- a/ibus-xx-gtk-legacy-icon.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From e2b07deb05182355f7bdecdd69a731a566ad832c Mon Sep 17 00:00:00 2001
-From: fujiwarat <takao.fujiwara1@gmail.com>
-Date: Thu, 17 Feb 2011 15:16:21 +0900
-Subject: [PATCH] Use gtk_icon_factory_lookup_default for GTK stock
-
-gtk_icon_theme_load_icon doesn't load GTK legacy stock ids because
-The stock legacy symlinks are removed in the latst GTK.
----
- ui/gtk/engineabout.py |   13 ++++++++++---
- ui/gtk/icon.py        |   40 ++++++++++++++++++++++++++++++++++++----
- ui/gtk/panel.py       |    4 ++--
- 3 files changed, 48 insertions(+), 9 deletions(-)
-
-diff --git a/ui/gtk/engineabout.py b/ui/gtk/engineabout.py
-index a34e930..1af806c 100644
---- a/ui/gtk/engineabout.py
-+++ b/ui/gtk/engineabout.py
-@@ -24,6 +24,7 @@ import gtk
- from gtk import gdk
- import pango
- import ibus
-+import icon as _icon
- 
- from i18n import _, N_
- 
-@@ -35,7 +36,9 @@ class EngineAbout(gtk.Dialog):
-         self.__init_ui()
- 
-     def __init_ui(self):
--        self.set_icon_name("gtk-about")
-+        # Gtk stock symlink is legacy.
-+        pixbufs = _icon.icon_set_get_pixbufs_default(None, gtk.STOCK_ABOUT)
-+        self.set_icon_list(*pixbufs)
-         sw = gtk.ScrolledWindow()
-         sw.set_shadow_type(gtk.SHADOW_ETCHED_IN)
-         sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-@@ -96,6 +99,10 @@ class EngineAbout(gtk.Dialog):
-             theme = gtk.icon_theme_get_default()
-             icon = theme.lookup_icon("ibus-engine", 48, 0)
-             if icon == None:
--                icon = theme.lookup_icon("gtk-missing-image", 48, 0)
--            pixbuf = icon.load_icon()
-+                # Gtk stock symlink is legacy.
-+                pixbuf = _icon.icon_set_get_pixbuf_default(None,
-+                                                           gtk.STOCK_MISSING_IMAGE,
-+                                                           48)
-+            else:
-+                pixbuf = icon.load_icon()
-         return pixbuf
-diff --git a/ui/gtk/icon.py b/ui/gtk/icon.py
-index 5b5f97f..d91fe4a 100644
---- a/ui/gtk/icon.py
-+++ b/ui/gtk/icon.py
-@@ -22,6 +22,32 @@
- 
- import gtk
- import gtk.gdk as gdk
-+import sys
-+
-+def icon_set_get_pixbuf_default(icon_set, stock_id, size, state=gtk.STATE_NORMAL):
-+    if icon_set == None:
-+        icon_set = gtk.icon_factory_lookup_default(stock_id)
-+    if icon_set == None:
-+        return None
-+    return icon_set.render_icon(gtk.widget_get_default_style(),
-+                                gtk.widget_get_default_direction(),
-+                                state,
-+                                size,
-+                                None, None)
-+
-+def icon_set_get_pixbufs_default(icon_set, stock_id, state=gtk.STATE_NORMAL):
-+    if icon_set == None:
-+        icon_set = gtk.icon_factory_lookup_default(stock_id)
-+    pixbufs = []
-+    if icon_set == None:
-+        return []
-+    for size in icon_set.get_sizes():
-+        pixbufs.append(icon_set.render_icon(gtk.widget_get_default_style(),
-+                                            gtk.widget_get_default_direction(),
-+                                            state,
-+                                            size,
-+                                            None, None))
-+    return pixbufs
- 
- class IconWidget(gtk.Image):
-     def __init__(self, icon, size):
-@@ -31,11 +57,17 @@ class IconWidget(gtk.Image):
-             if icon.startswith("/"):
-                 pixbuf = gdk.pixbuf_new_from_file(icon)
-             else:
--                theme = gtk.icon_theme_get_default()
--                pixbuf = theme.load_icon(icon, size, 0)
-+                # Gtk stock symlink is legacy.
-+                icon_set = gtk.icon_factory_lookup_default(icon)
-+                if icon_set != None:
-+                    pixbuf = icon_set_get_pixbuf_default(icon_set, icon, size)
-+                else:
-+                    theme = gtk.icon_theme_get_default()
-+                    pixbuf = theme.load_icon(icon, size, 0)
-         except:
--            theme = gtk.icon_theme_get_default()
--            pixbuf = theme.load_icon(gtk.STOCK_MISSING_IMAGE, size, 0)
-+            print >> sys.stderr, "Not Found Icon", icon, size
-+            # Gtk stock symlink is legacy.
-+            pixbuf = icon_set_get_pixbuf_default(None, gtk.STOCK_MISSING_IMAGE, size)
- 
-         width = pixbuf.get_width()
-         height = pixbuf.get_height()
-diff --git a/ui/gtk/panel.py b/ui/gtk/panel.py
-index 07b0fa2..2244455 100644
---- a/ui/gtk/panel.py
-+++ b/ui/gtk/panel.py
-@@ -412,7 +412,7 @@ class Panel(ibus.PanelBase):
-             menu.add(item)
- 
-         item = gtk.ImageMenuItem(_("Turn off input method"))
--        item.set_image(_icon.IconWidget("gtk-close", size[0]))
-+        item.set_image(_icon.IconWidget(gtk.STOCK_CLOSE, size[0]))
-         item.connect("activate", self.__im_menu_item_activate_cb, None)
-         if self.__focus_ic == None or not self.__focus_ic.is_enabled():
-             item.set_sensitive(False)
-@@ -452,7 +452,7 @@ class Panel(ibus.PanelBase):
-             menu = gtk.Menu()
-             item = gtk.ImageMenuItem(_("No input window"))
-             size = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)
--            item.set_image(_icon.IconWidget("gtk-info", size[0]))
-+            item.set_image(_icon.IconWidget(gtk.STOCK_INFO, size[0]))
-             menu.add(item)
-             menu.show_all()
-         else:
--- 
-1.7.4
-

diff --git a/ibus.spec b/ibus.spec
index 0946fb0..93375e9 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -6,13 +6,13 @@
 %define ibus_api_version 1.0
 
 %define glib_ver %([ -a %{_libdir}/pkgconfig/glib-2.0.pc ] && pkg-config --modversion glib-2.0 | cut -d. -f 1,2 || echo -n "999")
-%define gconf2_version 2.12.0
 %define dbus_python_version 0.83.0
-%define im_chooser_version 1.2.5
+# FIXME: It's better to use the new icon names
+%define gnome_icon_theme_legacy_version 2.91.6
 
 Name:       ibus
 Version:    1.3.99.20110206
-Release:    2%{?dist}
+Release:    3%{?dist}
 Summary:    Intelligent Input Bus for Linux OS
 License:    LGPLv2+
 Group:      System Environment/Libraries
@@ -29,8 +29,6 @@ Patch4:     ibus-657165-panel-libs.patch
 Patch5:     ibus-657165-gjs-plugins.patch
 # This will be removed after the new gnome-shell is integrated.
 Patch99:    ibus-675503-gnome-shell-workaround.patch
-# The latest gnome-icon-theme removes the legacy gtk-stock symlinks.
-Patch100:   ibus-xx-gtk-legacy-icon.patch
 
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -64,17 +62,18 @@ Requires:   pyxdg
 Requires:   iso-codes
 Requires:   dbus-python >= %{dbus_python_version}
 Requires:   dbus-x11
-Requires:   im-chooser >= %{im_chooser_version}
-Requires:   GConf2 >= %{gconf2_version}
+Requires:   im-chooser
+Requires:   GConf2
 Requires:   notify-python
 Requires:   librsvg2
+Requires:   gnome-icon-theme-legacy >= %{gnome_icon_theme_legacy_version}
 
 Requires(post):  desktop-file-utils
 Requires(postun):  desktop-file-utils
 
-Requires(pre): GConf2 >= %{gconf2_version}
-Requires(post): GConf2 >= %{gconf2_version}
-Requires(preun): GConf2 >= %{gconf2_version}
+Requires(pre): GConf2
+Requires(post): GConf2
+Requires(preun): GConf2
 
 Requires(post):  %{_sbindir}/alternatives
 Requires(postun):  %{_sbindir}/alternatives
@@ -143,7 +142,6 @@ The ibus-devel-docs package contains developer documentation for ibus
 bzcat %SOURCE2 | tar xf -
 %patch0 -p1
 %patch99 -p1 -b .g-s-typo
-%patch100 -p1 -b .legacy-stock
 # start surrounding patch
 %patch1 -p1 -b .surrounding
 cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c
@@ -314,9 +312,8 @@ fi
 %{_datadir}/gtk-doc/html/*
 
 %changelog
-* Thu Feb 17 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20110206-2
+* Fri Feb 18 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20110206-3
 - Fixed Bug 677856 - left ibus snooper when im client is switched.
-- Added ibus-xx-gtk-legacy-icon.patch to work without legacy gtk stock.
 
 * Mon Feb 14 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20110206-1
 - Integrated the part of gjs in Bug 657165 ibus for gnome-shell.

                 reply	other threads:[~2026-05-31  2:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178019310415.1.3737292076617324520.rpms-ibus-0e99b9268d1d@fedoraproject.org \
    --to=tfujiwar@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox