all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: "Jan D." <jan.h.d@swipnet.se>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Change the look of dialogs created with `x-popup-dialog'
Date: Fri, 16 Dec 2011 09:32:03 -0800	[thread overview]
Message-ID: <CAHQ1cqHC8rMRShpATXuwc3ya33oOy7=U-h0QGWRJQF7xp56bBg@mail.gmail.com> (raw)
In-Reply-To: <4EEB4AE2.5080909@swipnet.se>

On Fri, Dec 16, 2011 at 5:42 AM, Jan D. <jan.h.d@swipnet.se> wrote:
> Andrey Smirnov skrev 2011-12-15 05:56:
>
>> On Wed, Dec 14, 2011 at 12:41 PM, Jan Djärv<jan.h.d@swipnet.se>  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
toolkits?

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

>>
>> 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
`popup_dialog_response_cb':

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	other threads:[~2011-12-16 17:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-11 15:01 [PATCH] Change the look of dialogs created with `x-popup-dialog' Andrey Smirnov
2011-12-11 15:29 ` Lennart Borgman
2011-12-12 17:49   ` Stefan Monnier
2011-12-13  2:47     ` Andrey Smirnov
2011-12-13  2:54       ` Lennart Borgman
2011-12-12 17:44 ` Stefan Monnier
2011-12-13  7:07 ` Jan Djärv
2011-12-14  5:29   ` Andrey Smirnov
2011-12-14 20:41     ` Jan Djärv
2011-12-15  4:56       ` Andrey Smirnov
2011-12-16 13:42         ` Jan D.
2011-12-16 17:32           ` Andrey Smirnov [this message]

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='CAHQ1cqHC8rMRShpATXuwc3ya33oOy7=U-h0QGWRJQF7xp56bBg@mail.gmail.com' \
    --to=andrew.smirnov@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=jan.h.d@swipnet.se \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.