gEDA-dev: New autonumber text dialog

Werner Hoch werner.ho at gmx.de
Tue Nov 28 14:28:04 EST 2006


On Tuesday 28 November 2006 12:07, Tomaz Solc wrote:
> I would just like propose a little cosmetic change in the sort order
> combobox (patch is attached): I've added some more padding, so that
> it is easier to tell different icons apart. I also changed the order:
> I think it's better to have text labels on the left side and icons on
> the right.

You're right.

> If you think this adds to much size to the dialog just reduce the
> "xpad" and "ypad" numbers. However with no padding it takes me a few
> moments to see the separation between the "top to bottom" and "bottom
> to top" icons because they look like a continuous column of
> horizontal lines.

Some notes to the patch:

   gtk_combo_box_set_model(GTK_COMBO_BOX(sort_order), 
GTK_TREE_MODEL(store));
-  renderer = gtk_cell_renderer_pixbuf_new();
+  renderer = gtk_cell_renderer_text_new ();
+  renderer->width = 200;
   ^^^^^^^^^^^^^^^^^^^^^^^^
Setting fixed width is not a good thing.
Instead either ....

   gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (sort_order),
 			      renderer, FALSE);
                                        ^^^^^
set the expand variable TRUE, or pack the pixbufs to the end of the cell 
(with gtk_cell_layout_pack_end)

   gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (sort_order),
-				  renderer, "pixbuf", 0, NULL);
-  renderer = gtk_cell_renderer_text_new ();
+				  renderer, "text", 1, NULL);
+  renderer = gtk_cell_renderer_pixbuf_new();
+  renderer->xpad = 14;
+  renderer->ypad = 14;
    ^^^^^^^^^^^^^^^^^^^^^
Accesses to the variable should be replaced with
  g_object_set(G_OBJECT(renderer), "xpad", 10, "ypad", 10, NULL);

BTW: Removing the width=200 setting shrinked the dialog from 484 pixels 
to 405 pixels on my screen without any change of functionality ;-).

> By the way: I can't get the current CVS version of gschem to install
> properly (main and "autonumber" branch). I'm getting the following
> error:
>
> Making install in po
> make[2]: Entering directory `/home/avian/src/geda/gaf/gschem/po'
> /bin/sh @MKINSTALLDIRS@ /home/avian/software/share
> /bin/sh: @MKINSTALLDIRS@: No such file or directory
> make[2]: *** [install-data-yes] Error 127
> make[2]: Leaving directory `/home/avian/src/geda/gaf/gschem/po'
> make[1]: *** [install-recursive] Error 1
> make[1]: Leaving directory `/home/avian/src/geda/gaf/gschem'
> make: *** [gschem_install] Error 2

See:
http://archives.seul.org/geda/dev/Sep-2006/msg00160.html

Regards
Werner


More information about the geda-dev mailing list