From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Change the look of dialogs created with `x-popup-dialog' Date: Fri, 16 Dec 2011 14:42:58 +0100 Message-ID: <4EEB4AE2.5080909@swipnet.se> References: <890BD378-D3CE-41CE-AEC0-7CEAA1D8CE05@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1324043000 24914 80.91.229.12 (16 Dec 2011 13:43:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 16 Dec 2011 13:43:20 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andrey Smirnov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 16 14:43:15 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RbY49-0004wR-TU for ged-emacs-devel@m.gmane.org; Fri, 16 Dec 2011 14:43:14 +0100 Original-Received: from localhost ([::1]:39395 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbY49-0005cn-Gj for ged-emacs-devel@m.gmane.org; Fri, 16 Dec 2011 08:43:13 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:50900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbY43-0005ch-Ba for emacs-devel@gnu.org; Fri, 16 Dec 2011 08:43:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbY3y-00083G-O7 for emacs-devel@gnu.org; Fri, 16 Dec 2011 08:43:07 -0500 Original-Received: from mailout.melmac.se ([62.20.26.67]:35593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbY3y-00083A-Go for emacs-devel@gnu.org; Fri, 16 Dec 2011 08:43:02 -0500 Original-Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id 16C439793 for ; Fri, 16 Dec 2011 14:43:00 +0100 (CET) Original-Received: (qmail 26196 invoked by uid 89); 16 Dec 2011 13:42:25 -0000 Original-Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 16 Dec 2011 13:42:25 -0000 Original-Received: from [10.225.40.58] (unknown [193.45.43.33]) by coolsville.localdomain (Postfix) with ESMTPSA id 924C87FA058; Fri, 16 Dec 2011 14:42:59 +0100 (CET) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 62.20.26.67 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146740 Archived-At: Andrey Smirnov skrev 2011-12-15 05:56: > On Wed, Dec 14, 2011 at 12:41 PM, Jan Dj=E4rv wrot= e: >> 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=20 it really need it, and those that don't won't notice 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=20 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. > > 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=20 can't chain callbacks as Gtk+ can. And it forces changes for other=20 toolkits as well, for a small gain in clarity. > > > 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. +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=20 more Gtk-ish. Otherwise, make a typedef like: typedef void (*Xg_CBfunction) (GtkWidget *, gpointer); and use Xg_CBfunction. + struct xg_popup_dialog_callback_data *data =3D g_malloc (sizeof=20 (*data)); This is never free:d. Jan D.