Re: [gnome-db] Gnome-DB SQL Window syntax hi-lighting of keywordsRo



On Fri, 2002-03-22 at 20:33, Daniel Morgan wrote:
> Rodrigo,
> 
> Wow!  That easy?  Hmmm...
> 
> Warning, long-winded reply ahead... :-)
> 
> Since I was able to put the SQL editor into a new widget.  Is it okay if
> I do the same for the output text widget that I'm working on for the SQL
> Window?
> 
yes, makes sense.

> For the text output widget, I was able to get it working, but there were
> some problems I am having.
> 
> One of the problems has to do with GConf.  Sometimes, the keys just
> reset themselves to 0, or they disappear.  This baffles me.  What am I
> doing wrong?
> 
nothing, it's just GConf, which loses changes sometimes, at least for me
:-(

> In gnome-db's config.c:
> if (!gda_config_has_key (SQL_WINDOW_CONFIG_RESULTSET_WIDGET))
> 	gda_config_set_int (SQL_WINDOW_CONFIG_RESULTSET_WIDGET,
> 		0);
> 
> Here is the define in gnome-db's gnome-db-defs.h
> 
> #define
> SQL_WINDOW_CONFIG_RESULTSET_WIDGET
> "/apps/gnome-db/SqlWindow/ResultSetWidget"
> 
> When creating the SQL Window, I use the following code to get the
> setting:
> 	sql_view->priv->resultset_widget_setting = 
> 		gda_config_get_int (
> 			SQL_WINDOW_CONFIG_RESULTSET_WIDGET );
> 
> And based on that setting, I either use the grid widget or the text
> output widget for display a result set in the SQL Window.
> 
cool

> On another note, in the Settings dialog, I am trying to create a tab for
> the Database tab's SQL Window settings.  What is the best way to do
> this?
> 
hmm, this needs more work, since we have to integrate the configuration
for all the components in that dialog. What we need is to have each
component export its configuration dialog. I'm not sure yet how to do
it, so please, leave me some days to figure this out.

> In gnome-db-shell-settings.c, I added database_sqlwindow_resultset
> as a setting for which output widget to use.
> database_sqlwindow_resultset
> is a checkbox widget just like general_save_window_pos is.
> 
no, that is the 'General' configuration tab, which just will contain
config settings for the shell, and for some system-wide
libgnomedb/libgda settings (font to use for grid, etc). And that setting
you are trying to add (which widget to use as output) belongs to the
'Database' component, which will be implemented outside of
gnome-db-shell-settings.c. So, please, don't add anything to that file
until we figure out what's the best way to do the config settings.

I'll send right now another mail with my thoughts on how to do the
config dialog, for discussion.

cheers
-- 
Rodrigo Moya <rodrigo gnome-db org> - <rodrigo ximian com>
http://www.gnome-db.org/ - http://www.ximian.com/



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