gEDA-dev: [PATCH] gschem: remember dialog size and position
Carlos Nieves Ónega
cnieves at iespana.es
Wed May 2 13:56:40 EDT 2007
Hi Ivan,
great patch!. However you are using gtk_object_set_data, which seems to
be deprecated:
http://www.gtk.org/api/2.6/gtk/GtkObject.html#gtk-object-set-data
Warning
gtk_object_set_data is deprecated and should not be used in
newly-written code. Use g_object_set_data() instead.
It's easy to fix: just use g_object_set_data .
Regards,
Carlos
El lun, 30-04-2007 a las 20:49 +0200, Ivan Stankovic escribió:
> Hi,
>
> This patch makes gschem able to remember position and
> size for all dialogs (yes, I've tested them all :)).
> The information is stored in ~/.gEDA/gschem-dialog-geometry.
> This functionality is enabled only if glib version >= 2.6.0 is
> available, and applies cleanly on top of current CVS/git.
>
> Here is how it works. After creating the dialog widget, set
> the dialog name with a call like
>
> gtk_object_set_data(GTK_OBJECT(dialog), "dialog-name", "whatever");
>
> Here, "whatever" can be anything, as long as it's unique (usually,
> the name will be something meaningful, like "text-find").
> After that, you call
>
> dialog_restore_geometry(dialog);
>
> to restore dialog's last position and size (typically, this is done
> just before a call to gtk_widget_show_all()).
> You can save dialog's position and size with:
>
> dialog_save_geometry(dialog);
>
> (usually in a dialog's response routine, before the widget
> is destroyed).
>
> Please test, comments welcome.
>
>
> _______________________________________________
> geda-dev mailing list
> geda-dev at moria.seul.org
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev
More information about the geda-dev
mailing list