Re: [evolution-patches] [Fwd: [Evolution-hackers] Make attachment properties instant apply + HIGgy]



On Thu, 2004-06-03 at 06:42, Christian Neumair wrote:
> Am Mi, den 02.06.2004, 11:11 Uhr -0400 schrieb Jeffrey Stedfast:
> > On Wed, 2004-06-02 at 09:32, Christian Neumair wrote:
> > > -------- Weitergeleitete Nachricht --------
> > > > Von: Christian Neumair <chris gnome-de org>
> > > > An: evolution-hackers lists ximian com
> > > > Betreff: [Evolution-hackers] Make attachment properties instant apply
> > > > + HIGgy
> > > > Datum: Wed, 02 Jun 2004 14:31:57 +0200
> > > > The attached patch makes the attachment property dialog instant apply
> > > > and is a first shot at making it HIG compliant. The MIME entry has been
> > > > replaced by a label because it isn't editable at the moment and most
> > > > probably we won't get a nice MIME type picker for the next few months.
> > > 
> > > Sorry, wrong list.
> > > 
> > > ______________________________________________________________________
> > > Index: composer/e-msg-composer-attachment.c
> > > ===================================================================
> > > RCS file: /cvs/gnome/evolution/composer/e-msg-composer-attachment.c,v
> > > retrieving revision 1.52
> > > diff -u -r1.52 e-msg-composer-attachment.c
> > > --- composer/e-msg-composer-attachment.c	31 Mar 2004 10:08:03 -0000	1.52
> > > +++ composer/e-msg-composer-attachment.c	2 Jun 2004 12:30:03 -0000
> > > @@ -33,6 +33,7 @@
> > >  #include <errno.h>
> > >  
> > >  #include <camel/camel.h>
> > > +#include <gtk/gtklabel.h>
> > >  #include <gtk/gtknotebook.h>
> > >  #include <gtk/gtktogglebutton.h>
> > >  #include <gtk/gtkdialog.h>
> > > @@ -284,8 +285,8 @@
> > >  	GtkWidget *dialog;
> > >  	GtkEntry *file_name_entry;
> > >  	GtkEntry *description_entry;
> > > -	GtkEntry *mime_type_entry;
> > > -	GtkToggleButton *disposition_checkbox;
> > > +	GtkLabel *mime_type_label;
> > > +	GtkToggleButton *disposition_toggle_button;
> > >  	EMsgComposerAttachment *attachment;
> > 
> > ugh. don't the change the name of the disposition_checkbox for no
> > reason.
> > 
> > and PLEASE keep mime_type_entry as a GtkEntry.
> 
> Currently you can't change it. Anyway, I did what you said.
> 
> > >  } DialogData;
> > >  
> > > @@ -302,15 +303,14 @@
> > >   */
> > >  
> > >  static void
> > > -set_entry (GladeXML *xml, const char *widget_name, const char *value)
> > > +set_widget_value (GtkWidget *widget, const char *value)
> > >  {
> > > -	GtkEntry *entry;
> > > -	
> > > -	entry = GTK_ENTRY (glade_xml_get_widget (xml, widget_name));
> > > -	if (entry == NULL)
> > > -		g_warning ("Entry for `%s' not found.", widget_name);
> > > -	else
> > > -		gtk_entry_set_text (entry, value ? value : "");
> > > +	g_return_if_fail (widget != NULL);
> > > +
> > > +	if (GTK_IS_ENTRY (widget))
> > > +		gtk_entry_set_text (GTK_ENTRY (widget), value ? value : "");
> > > +	else if (GTK_IS_LABEL (widget))
> > > +		gtk_label_set_text (GTK_LABEL (widget), value ? value : "");
> > 
> > this change won't be needed anymore since mime_type_entry must stay an
> > entry widget.
> > 
> > anyways, a lot of other stuff doesn't need to change either.
> 
> Well, I considered it idiotic to query glade if you already fetched the
> widgets. It's your decision, though.
> Minimalistic patch attached.

I had meant the gtklabel stuff. sorry about that, anyway - no - your
original change was fine except for the label thing (which afaict isn't
needed if mime_type_entry stays an entry). I agree, querying glade for a
widget we already have access to is silly.

That said, however, I agree with NotZed about changing the filename at
every keystroke. Don't do that.

Not everything has to be instant apply, you know :-)

Actually, come to think of it - why even bother here? it's just not
worth it.

Jeff




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