Tal Hadad | 2 Aug 17:02 2011
Picon

Gnome panel(Gnome 2.x) contex menu(right click) doesn't pop for non-GtkLabel& another question


As described in the title, I have two questions:
1. This is only for my hope-made app(works fine for other panel apps). In the famous "Hello world" example,
it's only contains a label widget, so when I do this in my app the context menu is fine.
But when I add other non-label widget(only GtkComboBox and GtkButton(s)), the context menu works for the label, but not for the other widgets.
I also try to test it by adding to the GtkBox another GtkLabel(with all the above widgets), and guess what? Both labels response correctly for right click,
and the other widgets doesn't.
The context menu xml and verbs is the same to this Hello World Vala example:
http://live.gnome.org/Vala/PanelAppletSample
It's strange, right? All the other applets work fine!(also "non-labeled")

2. As I said before, I have an ComboBox in the panel, which contains different icons.
On one hand the box is too short(only icons display for choosing), but on the other hand, I don't want a too much expanded ComboBox(icon+ name of player + stat+ current playing + control button...)
So the idle solution for this, in my opinion, is to pop up some GtkContainer when I click the icon(I would give up the V drop-list button if necessary).
Then, I could add this "Box"(GtkContainer) what ever widget I want, and when the user hover it, I'll paint it blue. This is my idle solution, feel free to share your opinion.
But the problems are how to pop some GtkContainer when clicking the icon, and how to pop-down when clicking outside of it?

I hope I've made myself clear. I'm not sure if this is the right mailing list, just was the most appropriate by description, in my opinion.
_______________________________________________
gnome-devel-list mailing list
gnome-devel-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-devel-list
Tiago Katcipis | 11 Aug 13:52 2011
Picon

GObject get_property method copying string


Hi,


I'm developing a library using GObject and I'm having trouble creating a string property that does not makes a copy when g_object_get is called. I used g_value_set_static_string to avoid the string from being copied, but doing some debug it seems that g_object_get is copying my string anyway.

That is odd, because i see a lot of code using g_value_set_string on get_property, and that would produce a completely useless additional copy of the string (since g_object_get will copy it anyway).

Sorry to bother with such a stupid question but the documentation just says:

"In general, a copy is made of the property contents and the caller is responsible for freeing the memory in the appropriate manner for the type, for instance by calling g_free() or g_object_unref(). "

What would be "in general" ? Do i have some control of it ? (i was unable to find any) Am i understanding something wrong ?

Best regards,
Katcipis

_______________________________________________
gnome-devel-list mailing list
gnome-devel-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-devel-list
Benjamin Trias | 11 Aug 16:17 2011
Picon

Desktop Development Idea


Dear all,

I've joined the Linux community, thanks to Ubuntu about 4 years ago. It also encouraged me to learn programming, but it remains a hobby and I'm not very good at it. Although I'm quite happy with Ubuntu and Gnome in general, developments last year have been quite frustrating: I really didn't like Gnome 3, nor did I enjoy Ubuntu's Unity. So I've come to think what I would consider a good desktop environment and there's this idea I got, on which I tried to work. However, as I said, I am novice in programming, it's not my main activity and the learning curve is really slow because I sometime have to stay few months without programming...

Anyway this idea keeps pushing in my head and I don't want it to go wasted. So I would like to share it with you. Is this the right place? My hope is to find people who find the idea appealing and who would like to work on it or guide me a little.

Thanks,

Benjamin

_______________________________________________
gnome-devel-list mailing list
gnome-devel-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-devel-list
Steven Yong | 11 Aug 17:14 2011
Picon

Re: Desktop Development Idea


What is your idea?

On Aug 11, 2011 10:18 PM, "Benjamin Trias" <jesuisbenjamin <at> gmail.com> wrote:
>
_______________________________________________
gnome-devel-list mailing list
gnome-devel-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-devel-list
Benjamin Trias | 11 Aug 17:36 2011
Picon

Re: Desktop Development Idea


Hi Steven,

Thanks for your interest.

The idea consists of a dashboard providing the kind of advanced information you need about your computer, music, communication, weather, home, rss etc. The entire dashboard is hidden below the desktop as it were, only to show the topmost part, living just a thin edge, much like the current-gnome panel. When hitting a button/icon on the panel however, the dashboard rises showing the related information. eg. my weather icon shows 23°C, but i want details, so when clicking on it, the dashboard rises and i see the weather for the entire week, radar-map etc. You can imagine how that applies to other types of information.
Each type of info is contained within a window on the dashboard. You can switch window much like tabs, thanks to a menu which can appear either on the left or right (the menu consists of a list of those types of information).
You can also pin some of those windows to see multiple kind of information simultaneously. A pinned window will also show whenever the dashboard would rise again.
Explicitly closing the dashboard by clicking on an button or cliking outside of the dashboard would lower the dashboard again, leaving only the topmost panel-like bit visible.
The space occupied by the dashboard would depend on the amount of data to display or be constrained to a maximum by the end-user.
Notifications could also appear either as a horizontally scrolling text on the panel-bit or as a slight rise of this dashboard with text to display.

The point of this is to make all the handy information that most people use daily available on the desktop, without having them fetching it from various programs or browsers. The switch between panel and dashboard is aims at providing flexibility between basic information and thorough information.

I've got some mockup available but i don't know if this message will go through with a URL:
https://picasaweb.google.com/lh/photo/TYTjs94NaQrsMPlLgAcQvIrypTNYvS81JK5a63XKS2o?feat=directlink

I'm not that good in programming, it took me a while only to figure out how to reserve space on the screen, I haven't figured out what's the best way to get the raising/lowering of the window yet. I know it's way above my league, and it's a pretty clumsy approach, but that's what I've got.

I hope I was somehow clear on what I meant.

Regards,
Benjamin

On 11 August 2011 17:14, Steven Yong <woongiap <at> gmail.com> wrote:

What is your idea?

On Aug 11, 2011 10:18 PM, "Benjamin Trias" <jesuisbenjamin <at> gmail.com> wrote:
>

_______________________________________________
gnome-devel-list mailing list
gnome-devel-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-devel-list
Hongqing Yang | 12 Aug 04:47 2011
Picon

Re: Desktop Development Idea


----- Original Message -----
> From: "Benjamin Trias" <jesuisbenjamin <at> gmail.com>
> To: "Steven Yong" <woongiap <at> gmail.com>
> Cc: gnome-devel-list <at> gnome.org
> Sent: Thursday, August 11, 2011 11:36:26 PM
> Subject: Re: Desktop Development Idea
> Hi Steven,
> 
> Thanks for your interest.
> 
> The idea consists of a dashboard providing the kind of advanced
> information you need about your computer, music, communication,
> weather, home, rss etc. The entire dashboard is hidden below the
> desktop as it were, only to show the topmost part, living just a thin
> edge, much like the current-gnome panel. When hitting a button/icon on
> the panel however, the dashboard rises showing the related
> information. eg. my weather icon shows 23°C, but i want details, so
> when clicking on it, the dashboard rises and i see the weather for the
> entire week, radar-map etc. You can imagine how that applies to other
> types of information.
> Each type of info is contained within a window on the dashboard. You
> can switch window much like tabs, thanks to a menu which can appear
> either on the left or right (the menu consists of a list of those
> types of information).
> You can also pin some of those windows to see multiple kind of
> information simultaneously. A pinned window will also show whenever
> the dashboard would rise again.
> Explicitly closing the dashboard by clicking on an button or cliking
> outside of the dashboard would lower the dashboard again, leaving only
(Continue reading)

Benjamin Trias | 12 Aug 19:56 2011
Picon

Re: Desktop Development Idea


On 11 August 2011 17:36, Benjamin Trias <jesuisbenjamin <at> gmail.com> wrote:
>
> Hi Steven,
>
> Thanks for your interest.
>
> The idea consists of a dashboard providing the kind of advanced information you need about your computer,
music, communication, weather, home, rss etc. The entire dashboard is hidden below the desktop as it
were, only to show the topmost part, living just a thin edge, much like the current-gnome panel. When
hitting a button/icon on the panel however, the dashboard rises showing the related information. eg. my
weather icon shows 23°C, but i want details, so when clicking on it, the dashboard rises and i see the
weather for the entire week, radar-map etc. You can imagine how that applies to other types of information.
> Each type of info is contained within a window on the dashboard. You can switch window much like tabs,
thanks to a menu which can appear either on the left or right (the menu consists of a list of those types of information).
> You can also pin some of those windows to see multiple kind of information simultaneously. A pinned window
will also show whenever the dashboard would rise again.
> Explicitly closing the dashboard by clicking on an button or cliking outside of the dashboard would lower
the dashboard again, leaving only the topmost panel-like bit visible.
> The space occupied by the dashboard would depend on the amount of data to display or be constrained to a
maximum by the end-user.
> Notifications could also appear either as a horizontally scrolling text on the panel-bit or as a slight
rise of this dashboard with text to display.
>
> The point of this is to make all the handy information that most people use daily available on the desktop,
without having them fetching it from various programs or browsers. The switch between panel and
dashboard is aims at providing flexibility between basic information and thorough information.
>
> I've got some mockup available but i don't know if this message will go through with a URL:
> https://picasaweb.google.com/lh/photo/TYTjs94NaQrsMPlLgAcQvIrypTNYvS81JK5a63XKS2o?feat=directlink
(Continue reading)

Benjamin Trias | 17 Aug 23:18 2011
Picon

Re: Desktop Development Idea


Hello there,

I've been playing around a bit on the idea of a dashboard (using PyQt4). It doesn't look like much, but the bases have been laid. If you have any comment or suggestion, please let me know.

Here's a screen-cast of the dashboard so far: http://videobin.org/+51n/5fl.html

Greetings,
B.

On 12 August 2011 19:56, Benjamin Trias <jesuisbenjamin <at> gmail.com> wrote:
On 11 August 2011 17:36, Benjamin Trias <jesuisbenjamin <at> gmail.com> wrote:
>
> Hi Steven,
>
> Thanks for your interest.
>
> The idea consists of a dashboard providing the kind of advanced information you need about your computer, music, communication, weather, home, rss etc. The entire dashboard is hidden below the desktop as it were, only to show the topmost part, living just a thin edge, much like the current-gnome panel. When hitting a button/icon on the panel however, the dashboard rises showing the related information. eg. my weather icon shows 23°C, but i want details, so when clicking on it, the dashboard rises and i see the weather for the entire week, radar-map etc. You can imagine how that applies to other types of information.
> Each type of info is contained within a window on the dashboard. You can switch window much like tabs, thanks to a menu which can appear either on the left or right (the menu consists of a list of those types of information).
> You can also pin some of those windows to see multiple kind of information simultaneously. A pinned window will also show whenever the dashboard would rise again.
> Explicitly closing the dashboard by clicking on an button or cliking outside of the dashboard would lower the dashboard again, leaving only the topmost panel-like bit visible.
> The space occupied by the dashboard would depend on the amount of data to display or be constrained to a maximum by the end-user.
> Notifications could also appear either as a horizontally scrolling text on the panel-bit or as a slight rise of this dashboard with text to display.
>
> The point of this is to make all the handy information that most people use daily available on the desktop, without having them fetching it from various programs or browsers. The switch between panel and dashboard is aims at providing flexibility between basic information and thorough information.
>
> I've got some mockup available but i don't know if this message will go through with a URL:
> https://picasaweb.google.com/lh/photo/TYTjs94NaQrsMPlLgAcQvIrypTNYvS81JK5a63XKS2o?feat=directlink
(Continue reading)

Stefan Kost | 18 Aug 21:43 2011
Picon

Re: GObject get_property method copying string


On 08/11/11 13:52, Tiago Katcipis wrote:
>
>
> Hi,
>
> I'm developing a library using GObject and I'm having trouble creating
> a string property that does not makes a copy when g_object_get is
> called. I used g_value_set_static_string to avoid the string from
> being copied, but doing some debug it seems that g_object_get is
> copying my string anyway.
>
> That is odd, because i see a lot of code using g_value_set_string on
> get_property, and that would produce a completely useless additional
> copy of the string (since g_object_get will copy it anyway).
where is the extra copy being made in glib?

Stefan
>
> Sorry to bother with such a stupid question but the documentation just
> says:
>
> "In general, a copy is made of the property contents and the caller is
> responsible for freeing the memory in the appropriate manner for the
> type, for instance by calling |g_free()|
> <http://developer.gnome.org/glib/stable/glib/glib-Memory-Allocation.html#g-free>
> or |g_object_unref()|
> <http://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref>.
> "
>
(Continue reading)

Tiago Katcipis | 19 Aug 19:11 2011
Picon

Re: GObject get_property method copying string


Stephan,

On Thu, Aug 18, 2011 at 4:43 PM, Stefan Kost <ensonic <at> hora-obscura.de> wrote:

On 08/11/11 13:52, Tiago Katcipis wrote:
>
>
> Hi,
>
> I'm developing a library using GObject and I'm having trouble creating
> a string property that does not makes a copy when g_object_get is
> called. I used g_value_set_static_string to avoid the string from
> being copied, but doing some debug it seems that g_object_get is
> copying my string anyway.
>
> That is odd, because i see a lot of code using g_value_set_string on
> get_property, and that would produce a completely useless additional
> copy of the string (since g_object_get will copy it anyway).
where is the extra copy being made in glib?

I'm not sure, but for example, i have the following get_property function:

static void
gsip_codec_info_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
    GSipCodecInfo * codec = GSIP_CODEC_INFO(object);

    switch (prop_id)
    {
  
    case PROP_CODEC_INFO_PAYLOAD:
            return g_value_set_static_string (value, codec->payload);
        break;
    
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
        break;
    }
}

I expected that the returned string would be the same as codec->payload, but on my tests, it is not, what i get when i call:

gchar * payload = NULL;

g_object_get (codec_info, "payload", &payload, NULL);

is a copy of codec->payload. I confirmed that freeing payload and unrefing codec_info, it would result on a double free, but it actually works (also printing the address of the pointers obviously shows that is a copy).

Doing more debug, i confirmed that g_value_set_static_string is not copying the string (GValue holds the same gchar *), but something between there and my g_object_get call is copying it.

Best regards,
Katcipis

(Continue reading)


Gmane