[Top][All Lists]

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

Re: [PATCH] Change the look of dialogs created with `x-popup-dialog'

From: Andrey Smirnov
Subject: Re: [PATCH] Change the look of dialogs created with `x-popup-dialog'
Date: Fri, 16 Dec 2011 09:32:03 -0800

On Fri, Dec 16, 2011 at 5:42 AM, Jan D. <address@hidden> wrote:
> Andrey Smirnov skrev 2011-12-15 05:56:
>> On Wed, Dec 14, 2011 at 12:41 PM, Jan Djärv<address@hidden>  wrote:
>>> If you Alt-tab in icewm for example, it shows the titles, see
>>> attached picture.
>> Now, I see your point. On the other hand in Unity window title doesn't
>> play that important role in window-switching. Can we compromise on
>> exposing run-time variable something along the lines of
>> `gtk-popup-dialogs-show-titles' and then the appearance could be
>> controlled from user's .emacs?
> I think we should keep the same title as we had before.  Those that need it
> really need it, and those that don't won't notice it.

Not true, I don't need it but notice how, IMHO, ugly it is. :)
But, of course, if you insist, I'll add it.

>> All right, in for a penny in for a pound, how about
>> `gtk-popup-dialogs-message-format' to control that aspect?
> I'm not opposed to using larger and bold, but I think we need some sort of
> poll, or a descision from the maintainers.
>>> Perhaps, but then we maybe should change all ports?
>> Do you mean change how dialogs look in all toolkits?
> Actually I was just talking about larger and bold here.

Oh, OK, but I'm still looking into other toolkit's code.

>> It still won't change the fact that original
>> `dialog_selection_callback' duplicates the functionality of
>> `popup_deactivate_callback'.
> Yes, but that is something we won't want to change, as some toolkits can't
> chain callbacks as Gtk+ can.  And it forces changes for other toolkits as
> well, for a small gain in clarity.

There are two versions of `dialog_selection_callback' already:
Gtk-specific and `dialog_selection_callback' for any other toolkit.
How do my changes to Gtk-specific version force change on any other

And in this version of the patch even the chaining isn't needed

>> I attached reworked version of the patch, it still lacks comments with
>> description for new functions, but I'll add it as soon as the code
>> stabilizes.
> You are still not resetting popup_activated_flag.

I know, see my comment above.

> +struct xg_popup_dialog_callback_data
> +{
> +  void (*select_cb) (GtkWidget *, gpointer);
> +  void (*deactivate_cb) (GtkWidget *, gpointer);
> +  gboolean multichoice_p;
> +  GSList *radio_buttons;
> +};
> +
> You could use GCallback here and cast functions with GCALLBACK().  It is
> more Gtk-ish.

And then I would still, have to cast them to `void (*) (GtkWidget *,
gpointer)' in order to actually call them in `popup_dialog_response_cb'.

> Otherwise, make a typedef like:
>  typedef void (*Xg_CBfunction) (GtkWidget *, gpointer);
> and use Xg_CBfunction.

OK, since I already defined the structure whose definition isn't used
more than twice, I think I'll stick with this option.

> +      struct xg_popup_dialog_callback_data *data = g_malloc (sizeof
> (*data));
> This is never free:d.

Am I missing something and the last line in

g_free (user_data);

is never reached?

Although it was true for a piece of code(case
GTK_RESPONSE_DELETE_EVENT) I forgot to correct. Already fixed that.

Andrey Smirnov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]