Re: libbonoboui patch



On 29Dec2001 10:03PM (+0100), Anders Carlsson wrote:
> Hello,
> 
> the attached patch fixes an issue with icon sizes in the toolbar and
> adds suppoart for a resize_grip property for the statusbar which
> controls if the status bar should have a resize grip.
> 
> OK to commit?

Is it really a good idea to make that optional? Either the status bar
should always have it, or it should never have it. I don't see why
it's a good idea for some apps but not for others.

 - Maciej

> 
> //andersca
> andersca gnu org

> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/gnome/libbonoboui/ChangeLog,v
> retrieving revision 1.219
> diff -u -r1.219 ChangeLog
> --- ChangeLog	2001/12/27 03:46:20	1.219
> +++ ChangeLog	2001/12/29 21:04:00
> @@ -1,3 +1,15 @@
> +2001-12-29  Anders Carlsson  <andersca gnu org>
> +
> +	* doc/ui-xml.txt (Example): Update docs.
> +
> +	* bonobo/bonobo-ui-sync-status.c (impl_bonobo_ui_sync_status_state): 
> +	Check for resize_grip property.
> +	(impl_bonobo_ui_sync_status_build): Likewise.
> +
> +	* bonobo/bonobo-ui-sync-toolbar.c (cmd_get_toolbar_image): 
> +	Use GTK_ICON_SIZE_LARGE_TOOLBAR since that's what everyone
> +	else uses.
> +
>  2001-12-27  Duarte Loreto <happyguy_pt hotmail com>
>  
>          * configure.in: Added portuguese to ALL_LINGUAS
> Index: bonobo/bonobo-ui-sync-status.c
> ===================================================================
> RCS file: /cvs/gnome/libbonoboui/bonobo/bonobo-ui-sync-status.c,v
> retrieving revision 1.13
> diff -u -r1.13 bonobo-ui-sync-status.c
> --- bonobo/bonobo-ui-sync-status.c	2001/12/20 16:15:32	1.13
> +++ bonobo/bonobo-ui-sync-status.c	2001/12/29 21:04:01
> @@ -76,7 +76,21 @@
>  
>  	if (!strcmp (name, "main")) {
>  		const char *id_str;
> +		const char *resize_grip;
>  
> +		resize_grip = bonobo_ui_node_peek_attr (node, "resize_grip");
> +
> +		if (resize_grip) {
> +			if (!strcmp (resize_grip, "true")) {
> +				gtk_statusbar_set_has_resize_grip (
> +					msync->main_status, TRUE);
> +			}
> +			else if (!strcmp (resize_grip, "false")) {
> +				gtk_statusbar_set_has_resize_grip (
> +					msync->main_status, FALSE);
> +			}
> +		}
> +		
>  		id_str = bonobo_ui_engine_node_get_id (sync->engine, node);
>  
>  		msync->main_status = GTK_STATUSBAR (widget);
> @@ -135,10 +149,23 @@
>  		return NULL;
>  
>  	if (!strcmp (name, "main")) {
> +		const char *resize_grip;
>  
>  		widget = gtk_statusbar_new ();
> -		gtk_statusbar_set_has_resize_grip (
> -			GTK_STATUSBAR (widget), FALSE);
> +
> +		resize_grip = bonobo_ui_node_peek_attr (node, "resize_grip");
> +
> +		if (resize_grip) {
> +			if (!strcmp (resize_grip, "true")) {
> +				gtk_statusbar_set_has_resize_grip (
> +					GTK_STATUSBAR (widget), TRUE);
> +			}
> +			else {
> +				/* We disable the resize grip by default */
> +				gtk_statusbar_set_has_resize_grip (
> +					GTK_STATUSBAR (widget), FALSE);
> +			}
> +		}
>  
>  		gtk_signal_connect (GTK_OBJECT (widget),
>  				    "size_request",
> Index: bonobo/bonobo-ui-sync-toolbar.c
> ===================================================================
> RCS file: /cvs/gnome/libbonoboui/bonobo/bonobo-ui-sync-toolbar.c,v
> retrieving revision 1.28
> diff -u -r1.28 bonobo-ui-sync-toolbar.c
> --- bonobo/bonobo-ui-sync-toolbar.c	2001/12/21 11:52:48	1.28
> +++ bonobo/bonobo-ui-sync-toolbar.c	2001/12/29 21:04:02
> @@ -43,11 +43,11 @@
>  {
>  	if (bonobo_ui_node_peek_attr (node, "pixtype"))
>  		return bonobo_ui_util_xml_get_pixbuf (
> -			widget, node, GTK_ICON_SIZE_SMALL_TOOLBAR);
> +			widget, node, GTK_ICON_SIZE_LARGE_TOOLBAR);
>  
>  	if (bonobo_ui_node_peek_attr (cmd_node, "pixtype"))
>  		return bonobo_ui_util_xml_get_pixbuf (
> -			widget, cmd_node, GTK_ICON_SIZE_SMALL_TOOLBAR);
> +			widget, cmd_node, GTK_ICON_SIZE_LARGE_TOOLBAR);
>  
>  	return NULL;
>  }
> Index: doc/ui-xml.txt
> ===================================================================
> RCS file: /cvs/gnome/libbonoboui/doc/ui-xml.txt,v
> retrieving revision 1.1
> diff -u -r1.1 ui-xml.txt
> --- doc/ui-xml.txt	2001/07/12 18:12:38	1.1
> +++ doc/ui-xml.txt	2001/12/29 21:04:03
> @@ -165,15 +165,16 @@
>      <control name="Foo"/> 
>     </status>
>  
> -<status>     - encloses stuff to go in statusbar
> +<status>            - encloses stuff to go in statusbar
>  
> -<item>       - a plain text statusbar; contents of node are the text to display
> - name="main" - name of the standard statusbar 
> +<item>              - a plain text statusbar; contents of node are the text to display
> + name="main"        - name of the standard statusbar 
> + resize_grip="true" - Whether a resize grippy should be visible or not.
>  
> -<control>    - a control to be inserted into the status area. If name="main" 
> -	       it overrides the standard bar. Otherwise it gets packed
> -	       into the right side of the status area.
> - name="Foo"  - name of statusbar
> +<control>           - a control to be inserted into the status area. If name="main" 
> +		      it overrides the standard bar. Otherwise it gets packed
> +	              into the right side of the status area.
> + name="Foo"         - name of statusbar
>  
>  * Key bindings
>  




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