[Glade-devel] Feature requests for the next version of Glade
- From: jeannot12 linuxmail org (Jeannot Langlois)
- Subject: [Glade-devel] Feature requests for the next version of Glade
- Date: Thu, 05 Jun 2003 11:47:40 -0500
Hello,
After working with Glade 2.0.0 for some time, I have thought of two features which could be *GREATLY*
appreciated in the next release of Glade...:
----------------------------------------------------------------
1. In the "Properties" window's "Signals" tab, I'd like a new TextEntry field to be added for the user to
enter extra data which could be passed to the designated handler function (using every handler's last
"gpointer user_data" parameter).
This would be *VERY* handy.
Example: when needing to pass a GtkWidget* pointer to a "clicked" or "activate" or whatever event handler
function, the gtk_widget_destroy() function could be called properly within the event handler using the
"user_data" gpointer parameter, just like this:
...first the callback would be registered this way in the "interface.c" file (code which would be generated
by Glade):
g_signal_connect ((gpointer) mainwindow_quit_button,
"clicked",
G_CALLBACK (on_mainwindow_quit_button_clicked),
topLevelWindow); /* topLevelWindow is a GtkWidget* pointer which represents the ROOT
window;
it has been entered by the user in Glade >> Properties >> Signals >>
extra param
TextEntry field */
...the callback would be looking like this in the "callbacks.c" file (code within the callback would be
generated manually by the user):
void on_mainwindow_quit_button_clicked(GtkButton *button, gpointer user_data)
{
gtk_widget_destroy(GTK_WIDGET(user_data)); /* "topLevelWindow" is received as a gpointer and casted as a
GTK_WIDGET */
}
I can actually achieve this result very easily in my case by editing the "interface.c" file and replacing the
"NULL" fourth parameter by "topLevelWindow" in the g_signal_connect(...) function call which is generated by
Glade 2.0.0, but this change is LOST everytime the interface.c file is regenerated by Glade 2.0.0...
Code regeneration by Glade 2.0.0 happens *QUITE* often when designing/maintaining a UI, so that's why I'd
like to suggest a new TextEntry field in the "Signals" tab which could be used by the user to pass an
optional parameter to signal handlers using the "gpointer user_data" parameter without the need to manually
edit "interface.c" all the time.
----------------------------------------------------------------
2. When using custom (= NON-stock) pixmaps (mostly PNG files but I guess this applies to XPM as well) in the
"<projectname>/pixmaps" directory, after a "make install" is performed during a normal <projectname>
installation, the pixmaps cannot be found when running <projectname>:
(myprojectname:27937): GnomeUI-WARNING **: Could not find GNOME pixmap file myprojectname/channels.png
It turns out that pixmaps which are used by GnomeUIInfo menu entries like this one...
{
GNOME_APP_UI_ITEM, N_("Channels..."),
NULL,
(gpointer) on_channel_menuChoice, NULL, NULL,
GNOME_APP_PIXMAP_FILENAME, "myprojectname/channels.png",
0, (GdkModifierType) 0, NULL
}
...are looked up in the default GNOME pixmaps directory, which appears to be
"/usr/share/pixmaps/<projectname>" on my system.
Could it be possible to the user to MANUALLY configure the pixmaps's location PREFIX (by example, a TextEntry
could be added somewhere in "Properties" for the user to enter a specific PREFIX, like
"/usr/local/share/pixmaps/" -- which seems to be a default for "make install" (?)). I can actually
workaround this problem by defining a...
AC_DEFINE_UNQUOTED(GNOME_ICONDIR, "${ac_default_prefix}/share/pixmaps", [Location of custom GNOME icons])
...or a...
AC_DEFINE_UNQUOTED(GNOME_ICONDIR, "${prefix}/share/pixmaps", [Location of custom GNOME icons])
...constant in my "configure.in" file so I can prefix all my GnomeUIInfo entries who use custom pixmaps like
this:
{
GNOME_APP_UI_ITEM, N_("Channel..."),
NULL,
(gpointer) on_channel_menuChoice, NULL, NULL,
GNOME_APP_PIXMAP_FILENAME, GNOME_ICONDIR "myprojectname/channels.png", /* GNOME_ICONDIR added */
0, (GdkModifierType) 0, NULL
}
...and they get opened properly because GNOME_ICONDIR "myprojectname/channels.png" gets transformed into
"/usr/local/share/pixmaps/myprojectname/channels.png" after preprocessing.
Again, this requires constant modification to the "interface.c" file as it gets overwritten by Glade 2.0.0
constantly when changes are made to the UI.
----------------------------------------------------------------
When replying, please CC: me at "jeannot12 AT linuxmail DOT org" since I may not be subscribed to the Glade
devel mailing list for long (web mail quotas are small... :-).
All your comments are welcome. I can provide more details if necessary.
I hope these suggestions will be appreciated, as I'm sure they would help quite a few people who've
encountered these problems with Glade 2.0.0.
Regards,
--
Jeannot Langlois
B. Sc. Computer Science
jeannot12 AT linuxmail DOT org
--
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr
Powered by Outblaze
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]