No applet icon in gnome3 fallback session

Bug #1093349 reported by Gabriel Finkelstein on 2012-12-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cardapio
Undecided
Unassigned

Bug Description

The applet icon is missing in gnome3 on gnome-session-fallback. It only shows the label "Menu". I tried putting different values in "applet icon" in config.json and none work.

Using Cardapio 0.9.200 in 12.10

PS: I love Cardapio, thanks for all the work!

EDIT:
I just figured out its because of the GTK "buttons have icons" setting. I solved it by overriding that setting in __init__ with:

        settings = Gtk.Settings.get_default()
        settings.set_property('gtk-button-images', True)

Although my problem now is that the icon gets cut off at 14px height (with a 24px height panel). Right now I'm trying to figure out how to remove that 5px padding.

EDIT 2:
I solved it by adding the following:
        style_context = self.button.get_style_context()
        css_provider = Gtk.CssProvider()
        css = "GtkButton { padding: 0px 3px; } "
        css_provider.load_from_data(css)
        style_context.add_provider(css_provider,Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)

description: updated
description: updated
description: updated
Download full text (3.2 KiB)

Awesome! I will give it try on my machine and fix upstream ASAP.

Thanks for working on this!

On Sun, Dec 23, 2012 at 6:38 PM, Gabriel Finkelstein <
<email address hidden>> wrote:

> ** Description changed:
>
> The applet icon is missing in gnome3 on gnome-session-fallback. It only
> shows the label "Menu". I tried putting different values in "applet
> icon" in config.json and none work.
>
> Using Cardapio 0.9.200 in 12.10
>
> PS: I love Cardapio, thanks for all the work!
>
> EDIT:
> I just figured out its because of the GTK "buttons have icons" setting.
> I solved it by overriding that setting in __init__ with:
>
> - settings = Gtk.Settings.get_default()
> - settings.set_property('gtk-button-images', True)
> + {{{ settings = Gtk.Settings.get_default()
> + settings.set_property('gtk-button-images', True)}}}
>
> Although my problem now is that the icon gets cut off at 14px height
> (with a 24px height panel). Right now I'm trying to figure out how to
> remove that 5px padding.
> +
> + EDIT 2:
> + I solved it by adding the following:
> + style_context = self.button.get_style_context()
> + css_provider = Gtk.CssProvider()
> + css = "GtkButton { padding: 0px 3px; } "
> + css_provider.load_from_data(css)
> +
> style_context.add_provider(css_provider,Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
>
> ** Description changed:
>
> The applet icon is missing in gnome3 on gnome-session-fallback. It only
> shows the label "Menu". I tried putting different values in "applet
> icon" in config.json and none work.
>
> Using Cardapio 0.9.200 in 12.10
>
> PS: I love Cardapio, thanks for all the work!
>
> EDIT:
> I just figured out its because of the GTK "buttons have icons" setting.
> I solved it by overriding that setting in __init__ with:
>
> - {{{ settings = Gtk.Settings.get_default()
> - settings.set_property('gtk-button-images', True)}}}
> + settings = Gtk.Settings.get_default()
> + settings.set_property('gtk-button-images', True)
>
> Although my problem now is that the icon gets cut off at 14px height
> (with a 24px height panel). Right now I'm trying to figure out how to
> remove that 5px padding.
>
> EDIT 2:
> I solved it by adding the following:
> - style_context = self.button.get_style_context()
> - css_provider = Gtk.CssProvider()
> - css = "GtkButton { padding: 0px 3px; } "
> - css_provider.load_from_data(css)
> -
> style_context.add_provider(css_provider,Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
> + style_context = self.button.get_style_context()
> + css_provider = Gtk.CssProvider()
> + css = "GtkButton { padding: 0px 3px; } "
> + css_provider.load_from_data(css)
> +
> style_context.add_provider(css_provider,Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
>
> --
> You received this bug notification because you are a member of Cardapio
> team, which is subscribed to Cardapio.
> https://bugs.launchpad.net/bugs/1093349
>
> Title:
> No applet icon in gnome3 fallback session
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net...

Read more...

Thiago Teixeira (tvst) wrote :

Ok, I'm finally trying to figure out *where* you added those lines of code. Can you point me to the right file?

In CardapioGnome3Applet.py.
The first piece of code, around line 48 (right after __init__ definition).
The second piece, a couple of lines below, around line 52 of the original file (actually, it can go anywhere after the definition of the self.button variable).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers