Re: Remove unused icons in gnome-desktop

Il mar, 2004-10-05 alle 12:03, Mark McLoughlin ha scritto:
> Hi,
> On Tue, 2004-10-05 at 10:47, Luca Ferretti wrote:
> > > > Four icons are used by gnome-applets/gnome-panel, but those apps should
> > > > use available icons in gnome-icon-theme. Those icons are
> > > >       * gnome-mailcheck (by mail check applet) -> should use
> > > >         "stock_inbox.png" or "stock_mail*.png"
> > > >       * gnome-modem (by modemlights applet) -> should use modem.png
> > > >       * gnome-money (by stock ticker applet) -> should use
> > > >         stock-ticker.png
> > > 
> > > 	These should be fine to move to gnome-applets.
> > 
> > Why move them? IMHO the Good Way is put all generic icons in
> > gnome-icon-theme and retrieve them from here.
> 	Because they're not generic icons. If we remove the mailcheck applet,
> the mailcheck applet icon should go with it.
> 	If you're talking about changing things to use icons which already
> exist, then that might be reasonable but would need to be considered
> case by case. However, moving gnome-mailcheck.png to
> gnome-applets/mailcheck and installing it in icons/hicolor/48x48/apps is
> a sensible thing to do if we don't make it use an existing icon.

Of course. I'm sorry, I meant

      * edit the mailcheck applet code to use the named icon
        (stock_inbox or stock_mail) yet available in g-i-t
      * delete gnome-mailcheck.png from gnome-desktop package

So when I wrote "remove" I meant "delete". Everytime.

> > Note that those icons/pixmaps are in g-i-t 2.9.0 so I'm working on a
> > patch for gnome-applets to:
> >      1. add dependence on g-i-t >= 2.9.0
> >      2. add dependence on gtk+ >= 2.5.0
> >      3. edit the .desktop file of applet and change the value of Icon
> >         entry
> >      4. edit the .server file of applet and change the value of
> >         "panel:icon" oaf_attribute
> >      5. edit the code to use the new gtk_window_set_default_icon_name ()
> >      6. edit the code to use the new GtkAboutWindow widget with the
> >         named icon as logo.
> 	I think Davyd is doing some of this at the moment. Might want to sync
> up with him.

email ?

> > So the applet is fully themeable. Well honestly the logo in
> > GtkAboutWindow is not updated if you keep the about window open and
> > change the icon theme. You have to close the the about window and reopen
> > it, but probably I just need to connect the icontheme:changed signal to
> > the widget representing the about window.
> 	That's a bug in GtkAboutWindow, then.

No, I don't think, maybe I'm doing something wrong. The code I wrote is
something like

   icon_theme = gtk_icon_theme_get_default();
   pixbuf = gtk_icon_theme_load_icon (icon_theme,

   if (!pixbuf)
     g_warning ("Couldn't load Stock Ticker about icon");

   stockdata->about_dialog = g_object_new (GTK_TYPE_ABOUT_DIALOG,
                       "name", _("Stock Ticker"),
                       "version", VERSION,
                       "copyright", copyright,
                       "comments", comments,
                       "authors", authors,
                       "documenters", documenters,
                       "translator-credits", _("translator-credits"),
                       "logo", pixbuf,
   if (pixbuf != NULL)
     g_object_unref (pixbuf);

The window icon for GtkAboutWindow is grabbed from parent "window" (=the
applet itself). I set up the window icon for the applet with a 

   gtk_window_set_default_icon_name ("stock-ticker");

in the appropriate place. So the window icon of about dialog is updated
when the icon theme changes and the dialog is open.

But the pixbuf for logo is loaded before build up the about dialog, and
it's a GdkPixbuf. I don't think GTK+ automatically update a pixbuf when
it's loaded from a named icon.

Now I want try to
     1. use get_from_screen instead get_default. But I didn't yet read
        documentation in details
     2. use gtk_about_dialog_new () and don't define the logo. The
        GtkAboutDialog references say that if the logo is not defined or
        if you set to NULL, I don't remember now, the window icon is
        used as logo.
     3. of course if 1 and 2 fails connect the icontheme:changed signal,
        write a callback to grab the pixmap from the new theme and call
        the gtk_about_dialog_set_logo ()

Of course I made a simple icon, copying gnome-money.png as
stock-ticker.png to test the code.

> >      A. icon is used somewere in GNOME Desktop
> >      B. a copy of the icon is yet in g-i-t
> >      C. icon follows guidelines
> >      D. icon can be useful
> 	If an icon only falls under the "it can be useful" category, then
> *that* sounds like a generic icon to me and should be somewhere like
> gnome-icon-theme.

True, but non all generic pixmaps (note, pixmaps, not icons) need to be
themeable (exampe: gnome-logo*) ;-)

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