2 * irreco-backend-browser
3 * Copyright (C) 2008 Arto Karppinen <arto.karppinen@iki.fi>
5 * irreco-backend-browser is free software: you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation, either version 2 of the License, or
8 * (at your option) any later version.
10 * irreco-backend-browser is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 #include "browser_backend.h"
20 #include "browser_backend_dlg.h"
21 #include "browser_enum_types.h"
22 #include "browser_run.h"
25 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
27 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
39 BROWSER_RESPONSE_ADD
= 10,
40 BROWSER_RESPONSE_DELETE
,
44 typedef struct _BrowserBackendDlgPrivate BrowserBackendDlgPrivate
;
45 struct _BrowserBackendDlgPrivate
{
47 GtkTreeSelection
*selection
;
49 GtkWidget
*scrolled_set
;
50 GtkWidget
*browser_radio
;
51 GtkWidget
*wget_radio
;
52 GtkWidget
*description_entry
;
58 #define _GET_PRIVATE(_self) \
59 G_TYPE_INSTANCE_GET_PRIVATE( \
60 BROWSER_BACKEND_DLG(_self), \
61 BROWSER_TYPE_BACKEND_DLG, \
62 BrowserBackendDlgPrivate);
66 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
68 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
70 browser_backend_dlg_add_column( BrowserBackendDlg
*self
,
75 browser_backend_dlg_signal_switch_page( GtkNotebook
*notebook
,
76 GtkNotebookPage
*page
,
78 BrowserBackendDlg
*self
);
80 browser_backend_dlg_signal_selection_changed(GtkTreeSelection
*treeselection
,
81 BrowserBackendDlg
*self
);
83 browser_backend_dlg_signal_text_edited( GtkCellRendererText
*renderer
,
86 BrowserBackendDlg
*self
);
88 browser_backend_dlg_signal_setting_vadj_changed( GtkAdjustment
*adjustment
,
89 BrowserBackendDlg
*self
);
93 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
94 /* Construction & Destruction */
95 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
97 G_DEFINE_TYPE( BrowserBackendDlg
, browser_backend_dlg
, GTK_TYPE_DIALOG
)
100 browser_backend_dlg_init (BrowserBackendDlg
*object
)
102 /* TODO: Add initialization code here */
106 browser_backend_dlg_finalize (GObject
*object
)
108 /* TODO: Add deinitalization code here */
110 G_OBJECT_CLASS (browser_backend_dlg_parent_class
)->finalize (object
);
114 browser_backend_dlg_set_property (GObject
*object
, guint prop_id
, const GValue
*value
, GParamSpec
*pspec
)
116 BrowserBackendDlg
*self
= NULL
;
117 BrowserBackendDlgPrivate
*priv
= NULL
;
119 g_return_if_fail (BROWSER_IS_BACKEND_DLG (object
));
121 self
= BROWSER_BACKEND_DLG( object
);
122 priv
= _GET_PRIVATE( self
);
127 priv
->store
= GTK_LIST_STORE( g_value_get_object( value
));
130 case PROP_BROWSER_TYPE
:
131 switch ( g_value_get_enum( value
)) {
132 case BROWSER_APPLICATION_MAEMO
:
133 gtk_toggle_button_set_active(
134 GTK_TOGGLE_BUTTON( priv
->browser_radio
),
138 case BROWSER_APPLICATION_WGET
:
139 gtk_toggle_button_set_active(
140 GTK_TOGGLE_BUTTON( priv
->wget_radio
),
146 case PROP_DESCRIPTION
:
147 gtk_entry_set_text( GTK_ENTRY( priv
->description_entry
),
148 g_value_get_string( value
));
152 G_OBJECT_WARN_INVALID_PROPERTY_ID (object
, prop_id
, pspec
);
158 browser_backend_dlg_get_property (GObject
*object
, guint prop_id
, GValue
*value
, GParamSpec
*pspec
)
160 BrowserBackendDlg
*self
= NULL
;
161 BrowserBackendDlgPrivate
*priv
= NULL
;
163 g_return_if_fail (BROWSER_IS_BACKEND_DLG (object
));
165 self
= BROWSER_BACKEND_DLG( object
);
166 priv
= _GET_PRIVATE( self
);
171 g_value_set_object( value
, priv
->store
);
174 case PROP_BROWSER_TYPE
:
175 if ( gtk_toggle_button_get_active(
176 GTK_TOGGLE_BUTTON( priv
->browser_radio
))) {
177 g_value_set_enum( value
, BROWSER_APPLICATION_MAEMO
);
179 } else if ( gtk_toggle_button_get_active(
180 GTK_TOGGLE_BUTTON( priv
->wget_radio
))) {
181 g_value_set_enum( value
, BROWSER_APPLICATION_WGET
);
185 case PROP_DESCRIPTION
:
186 g_value_set_string( value
,
188 GTK_ENTRY( priv
->description_entry
)));
192 G_OBJECT_WARN_INVALID_PROPERTY_ID (object
, prop_id
, pspec
);
198 browser_backend_dlg_constructed(GObject
*object
)
200 BrowserBackendDlg
*self
= NULL
;
201 BrowserBackendDlgPrivate
*priv
= NULL
;
202 GtkWidget
*notebook
= NULL
;
203 GtkWidget
*treeview
= NULL
;
204 GtkWidget
*scrolled_url
= NULL
;
205 GtkWidget
*settings
= NULL
;
206 GtkWidget
*scrolled_pad
= NULL
;
207 GtkWidget
*settings_pad
= NULL
;
208 GtkWidget
*open_label
= NULL
;
209 GtkWidget
*description_label
= NULL
;
210 GtkAdjustment
*adjustment
= NULL
;
213 self
= BROWSER_BACKEND_DLG( object
);
214 priv
= _GET_PRIVATE( self
);
217 gtk_window_set_title( GTK_WINDOW( self
),
218 _( "Web Browser Configuration" ));
219 gtk_window_set_modal( GTK_WINDOW( self
), TRUE
);
220 gtk_window_set_destroy_with_parent( GTK_WINDOW( self
), TRUE
);
221 gtk_dialog_set_has_separator( GTK_DIALOG(self
), FALSE
);
222 gtk_dialog_add_buttons( GTK_DIALOG( self
),
223 GTK_STOCK_ADD
, BROWSER_RESPONSE_ADD
,
224 GTK_STOCK_DELETE
, BROWSER_RESPONSE_DELETE
,
225 _( "Test" ), BROWSER_RESPONSE_TEST
,
226 GTK_STOCK_OK
, GTK_RESPONSE_OK
,
230 treeview
= gtk_tree_view_new_with_model( GTK_TREE_MODEL( priv
->store
));
231 gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( treeview
), TRUE
);
232 browser_backend_dlg_add_column( self
, treeview
, "Name", COL_NAME
);
233 browser_backend_dlg_add_column( self
, treeview
, "URL", COL_URL
);
235 priv
->selection
= gtk_tree_view_get_selection(
236 GTK_TREE_VIEW( treeview
));
237 gtk_tree_selection_set_mode( priv
->selection
, GTK_SELECTION_SINGLE
);
238 browser_backend_dlg_signal_selection_changed( priv
->selection
, self
);
239 g_signal_connect( G_OBJECT( priv
->selection
), "changed",
240 G_CALLBACK( browser_backend_dlg_signal_selection_changed
),
243 scrolled_url
= gtk_scrolled_window_new( NULL
, NULL
);
244 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolled_url
),
245 GTK_POLICY_AUTOMATIC
,
246 GTK_POLICY_AUTOMATIC
);
247 gtk_container_add( GTK_CONTAINER( scrolled_url
), GTK_WIDGET( treeview
));
249 /* Build Settings tab. */
250 settings
= gtk_vbox_new( FALSE
, 4 );
251 open_label
= irreco_gtk_label_bold( _( "How should URL's be opened?" ),
252 0, 0.5, 0, 0, 0, 0 );
253 priv
->browser_radio
= gtk_radio_button_new( NULL
);
254 priv
->wget_radio
= gtk_radio_button_new_from_widget(
255 GTK_RADIO_BUTTON( priv
->browser_radio
));
256 gtk_button_set_label( GTK_BUTTON( priv
->browser_radio
),
257 _( "Inside the Web Browser." ));
258 gtk_button_set_label( GTK_BUTTON( priv
->wget_radio
),
259 _( "Hidden in the background using wget." ));
261 description_label
= irreco_gtk_label_bold( _( "Description" ),
262 0, 0.5, 8, 0, 0, 0 );
263 priv
->description_entry
= gtk_entry_new();
265 priv
->scrolled_set
= gtk_scrolled_window_new( NULL
, NULL
);
266 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( priv
->scrolled_set
),
268 GTK_POLICY_AUTOMATIC
);
269 adjustment
= gtk_scrolled_window_get_vadjustment(
270 GTK_SCROLLED_WINDOW( priv
->scrolled_set
));
271 g_signal_connect( G_OBJECT( adjustment
), "changed",
272 G_CALLBACK( browser_backend_dlg_signal_setting_vadj_changed
),
275 gtk_container_add( GTK_CONTAINER( settings
),
276 GTK_WIDGET( open_label
));
277 gtk_container_add( GTK_CONTAINER( settings
),
278 irreco_gtk_pad( GTK_WIDGET( priv
->browser_radio
),
280 gtk_container_add( GTK_CONTAINER( settings
),
281 irreco_gtk_pad( GTK_WIDGET( priv
->wget_radio
),
283 gtk_container_add( GTK_CONTAINER( settings
),
284 GTK_WIDGET( description_label
));
285 gtk_container_add( GTK_CONTAINER( settings
),
286 irreco_gtk_pad( GTK_WIDGET( priv
->description_entry
),
288 gtk_scrolled_window_add_with_viewport(
289 GTK_SCROLLED_WINDOW( priv
->scrolled_set
),
290 irreco_gtk_align( GTK_WIDGET( settings
),
291 0, 0, 1, 0, 0, 0, 0, 0 ));
293 /* Build notebook. */
294 notebook
= gtk_notebook_new();
295 scrolled_pad
= irreco_gtk_pad( GTK_WIDGET( scrolled_url
),
298 gtk_notebook_append_page( GTK_NOTEBOOK( notebook
),
300 gtk_label_new( _( "Addresses" )));
301 settings_pad
= irreco_gtk_align( GTK_WIDGET( priv
->scrolled_set
),
302 0, 0, 1, 1, 8, 8, 8, 8 );
303 priv
->settings_tab_id
=
304 gtk_notebook_append_page( GTK_NOTEBOOK( notebook
),
306 gtk_label_new( _( "Settings" )));
307 g_signal_connect( G_OBJECT( notebook
), "switch-page",
308 G_CALLBACK( browser_backend_dlg_signal_switch_page
),
312 gtk_container_add( GTK_CONTAINER( GTK_DIALOG( self
)->vbox
),
313 irreco_gtk_pad( GTK_WIDGET( notebook
),
315 gtk_window_resize( GTK_WINDOW( self
), 1, 400 );
316 gtk_widget_show_all( GTK_WIDGET( self
));
321 browser_backend_dlg_class_init (BrowserBackendDlgClass
*klass
)
323 GObjectClass
* object_class
= G_OBJECT_CLASS (klass
);
324 /* GtkDialogClass* parent_class = GTK_DIALOG_CLASS (klass); */
326 object_class
->finalize
= browser_backend_dlg_finalize
;
327 object_class
->set_property
= browser_backend_dlg_set_property
;
328 object_class
->get_property
= browser_backend_dlg_get_property
;
329 object_class
->constructed
= browser_backend_dlg_constructed
;
331 g_type_class_add_private( klass
, sizeof( BrowserBackendDlgPrivate
));
333 g_object_class_install_property( object_class
,
335 g_param_spec_object( BROWSER_BACKEND_DLG_PROP_STORE
,
340 | G_PARAM_CONSTRUCT_ONLY
));
342 g_object_class_install_property( object_class
,
344 g_param_spec_enum( BROWSER_BACKEND_DLG_PROP_BROWSER_TYPE
,
347 BROWSER_TYPE_APPLICATION_TYPE
,
348 BROWSER_APPLICATION_MAEMO
,
349 G_PARAM_READWRITE
));
351 g_object_class_install_property( object_class
,
353 g_param_spec_string( BROWSER_BACKEND_DLG_PROP_DESCRIPTION
,
357 G_PARAM_READWRITE
));
362 browser_backend_dlg_new( GtkListStore
*store
)
364 BrowserBackendDlg
*self
= NULL
;
367 self
= g_object_new( BROWSER_TYPE_BACKEND_DLG
, "store", store
, NULL
);
368 IRRECO_RETURN_PTR( self
);
373 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
374 /* Private Functions */
375 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
378 browser_backend_dlg_add_column( BrowserBackendDlg
*self
,
383 GtkTreeViewColumn
*column
= NULL
;
384 GtkCellRenderer
*renderer
= NULL
;
387 /* Create renderer. */
388 renderer
= gtk_cell_renderer_text_new();
389 g_object_set( G_OBJECT( renderer
),
392 g_object_set_data( G_OBJECT( renderer
), "column",
393 GINT_TO_POINTER( store_column
));
394 g_signal_connect( G_OBJECT( renderer
), "edited",
395 G_CALLBACK( browser_backend_dlg_signal_text_edited
),
398 /* Add column to treeview. */
399 gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( treeview
), TRUE
);
400 column
= gtk_tree_view_column_new_with_attributes( name
,
402 "text", store_column
,
404 gtk_tree_view_append_column( GTK_TREE_VIEW( treeview
), column
);
409 browser_backend_dlg_responce_add( BrowserBackendDlg
*self
)
411 BrowserBackendDlgPrivate
*priv
= NULL
;
412 GtkWidget
*dialog
= NULL
;
413 GtkWidget
*table
= NULL
;
414 GtkWidget
*name
= NULL
;
415 GtkWidget
*url
= NULL
;
416 GtkAttachOptions opts
= 0;
419 priv
= _GET_PRIVATE( self
);
421 /* Create objects. */
422 dialog
= gtk_dialog_new_with_buttons(
423 _( "Add URL" ), GTK_WINDOW( self
),
424 GTK_DIALOG_MODAL
| GTK_DIALOG_DESTROY_WITH_PARENT
|
425 GTK_DIALOG_NO_SEPARATOR
,
426 GTK_STOCK_CANCEL
, GTK_RESPONSE_CANCEL
,
427 GTK_STOCK_OK
, GTK_RESPONSE_OK
,
429 table
= gtk_table_new( 2, 2, FALSE
);
430 name
= gtk_entry_new();
431 url
= gtk_entry_new();
434 opts
= GTK_SHRINK
| GTK_FILL
;
435 gtk_entry_set_text( GTK_ENTRY( url
), "http://" );
436 gtk_table_attach( GTK_TABLE( table
),
437 irreco_gtk_label( _( "Name:" ), 0, 0.5, 0, 0, 0, 0 ),
438 0, 1, 0, 1, opts
, opts
, 0, 0 );
439 gtk_table_attach_defaults( GTK_TABLE( table
), name
, 1, 2, 0, 1 );
440 gtk_table_attach( GTK_TABLE( table
),
441 irreco_gtk_label( _( "URL:" ), 0, 0.5, 0, 0, 0, 0 ),
442 0, 1, 1, 2, opts
, opts
, 0, 0 );
443 gtk_table_attach_defaults( GTK_TABLE( table
), url
, 1, 2, 1, 2 );
446 gtk_table_set_row_spacings( GTK_TABLE( table
), 4 );
447 gtk_table_set_col_spacings( GTK_TABLE( table
), 4 );
448 gtk_container_add( GTK_CONTAINER( GTK_DIALOG( dialog
)->vbox
),
449 irreco_gtk_pad( GTK_WIDGET( table
), 8, 8, 8, 8 ));
450 gtk_window_resize( GTK_WINDOW( dialog
), 550, 1 );
451 gtk_widget_show_all( dialog
);
454 while ( gtk_dialog_run( GTK_DIALOG( dialog
)) == GTK_RESPONSE_OK
) {
456 const gchar
*name_str
= NULL
;
457 const gchar
*url_str
= NULL
;
459 name_str
= gtk_entry_get_text( GTK_ENTRY( name
));
460 url_str
= gtk_entry_get_text( GTK_ENTRY( url
));
462 if ( irreco_str_isempty( name_str
)) {
463 irreco_error_dlg( GTK_WINDOW( dialog
),
464 _( "Name is empty!" ));
465 } else if ( irreco_str_isempty( url_str
)) {
466 irreco_error_dlg( GTK_WINDOW( dialog
),
467 _( "URL is empty!" ));
470 gtk_list_store_append( priv
->store
, &iter
);
471 gtk_list_store_set( priv
->store
, &iter
,
479 gtk_widget_destroy(dialog
);
484 browser_backend_dlg_responce_delete( BrowserBackendDlg
*self
)
486 BrowserBackendDlgPrivate
*priv
= NULL
;
490 priv
= _GET_PRIVATE( self
);
492 if ( gtk_tree_selection_get_selected( priv
->selection
, NULL
, &iter
)) {
500 browser_backend_dlg_responce_test( BrowserBackendDlg
*self
)
502 BrowserBackendDlgPrivate
*priv
= NULL
;
504 BrowserApplicationType type
= 0;
505 IrrecoBackendStatus status
= 0;
509 priv
= _GET_PRIVATE( self
);
511 if ( gtk_tree_selection_get_selected( priv
->selection
, NULL
, &iter
)) {
513 gtk_tree_model_get( GTK_TREE_MODEL( priv
->store
), &iter
,
516 g_object_get( G_OBJECT( self
),
517 BROWSER_BACKEND_DLG_PROP_BROWSER_TYPE
,
521 status
= browser_run( type
, url
);
524 if ( status
== IRRECO_BACKEND_OK
) {
525 irreco_info_dlg( GTK_WINDOW( self
),
528 irreco_error_dlg( GTK_WINDOW( self
),
529 _( browser_get_error_msg( status
)));
538 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
539 /* Public Functions */
540 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
543 browser_backend_dlg_run( BrowserBackendDlg
*self
)
545 BrowserBackendDlgPrivate
*priv
= NULL
;
547 gboolean loop
= TRUE
;
550 priv
= _GET_PRIVATE( self
);
553 response
= gtk_dialog_run( GTK_DIALOG( self
));
555 switch ( response
) {
556 case GTK_RESPONSE_OK
:
560 case BROWSER_RESPONSE_ADD
:
561 browser_backend_dlg_responce_add( self
);
564 case BROWSER_RESPONSE_DELETE
:
565 browser_backend_dlg_responce_delete( self
);
568 case BROWSER_RESPONSE_TEST
:
569 browser_backend_dlg_responce_test( self
);
579 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
580 /* Events and Callbacks */
581 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
584 browser_backend_dlg_signal_switch_page( GtkNotebook
*notebook
,
585 GtkNotebookPage
*page
,
587 BrowserBackendDlg
*self
)
589 BrowserBackendDlgPrivate
*priv
= NULL
;
590 GtkWidget
*add
= NULL
;
591 GtkWidget
*del
= NULL
;
592 GtkWidget
*test
= NULL
;
595 priv
= _GET_PRIVATE( self
);
596 add
= irreco_gtk_dialog_get_button( GTK_WIDGET( self
), 0 );
597 del
= irreco_gtk_dialog_get_button( GTK_WIDGET( self
), 1 );
598 test
= irreco_gtk_dialog_get_button( GTK_WIDGET( self
), 2 );
600 if ( page_num
== priv
->url_tab_id
) {
601 gtk_widget_show( add
);
602 gtk_widget_show( del
);
603 gtk_widget_show( test
);
605 gtk_widget_hide( add
);
606 gtk_widget_hide( del
);
607 gtk_widget_hide( test
);
610 IRRECO_RETURN_BOOL( FALSE
)
614 browser_backend_dlg_signal_selection_changed(GtkTreeSelection
*treeselection
,
615 BrowserBackendDlg
*self
)
617 BrowserBackendDlgPrivate
*priv
= NULL
;
618 GtkWidget
*del
= NULL
;
619 GtkWidget
*test
= NULL
;
622 priv
= _GET_PRIVATE( self
);
623 del
= irreco_gtk_dialog_get_button( GTK_WIDGET( self
), 1 );
624 test
= irreco_gtk_dialog_get_button( GTK_WIDGET( self
), 2 );
626 if ( gtk_tree_selection_get_selected( priv
->selection
, NULL
, NULL
)) {
627 gtk_widget_set_sensitive( del
, TRUE
);
628 gtk_widget_set_sensitive( test
, TRUE
);
630 gtk_widget_set_sensitive( del
, FALSE
);
631 gtk_widget_set_sensitive( test
, FALSE
);
637 browser_backend_dlg_signal_text_edited( GtkCellRendererText
*renderer
,
640 BrowserBackendDlg
*self
)
642 BrowserBackendDlgPrivate
*priv
= NULL
;
648 priv
= _GET_PRIVATE( self
);
649 column
= GPOINTER_TO_INT( g_object_get_data( G_OBJECT( renderer
),
651 path
= gtk_tree_path_new_from_string(path_str
);
652 gtk_tree_model_get_iter( GTK_TREE_MODEL( priv
->store
), &iter
, path
);
653 gtk_list_store_set( priv
->store
, &iter
, column
, new_text
, -1);
654 gtk_tree_path_free( path
);
660 * This function is, in effect, called when the vertical size of setting
661 * GtkScrolledWindow is changed.
664 browser_backend_dlg_signal_setting_vadj_changed( GtkAdjustment
*adjustment
,
665 BrowserBackendDlg
*self
)
667 BrowserBackendDlgPrivate
*priv
= NULL
;
668 GtkWidget
*vscroll
= NULL
;
673 priv
= _GET_PRIVATE( self
);
675 /* If description entry widget has focus, attempt to adjust
676 * scrollbars so that the widget is visible. By default clicking on
677 * the widget causes maemo keyboard to be shown, which is turn causes
678 * the window to be resized, and that causes the vidget to be hidden.
680 if ( GTK_WIDGET_HAS_FOCUS( GTK_WIDGET( priv
->description_entry
) )) {
681 IRRECO_PRINTF( "focus\n" );
683 g_object_get( G_OBJECT( adjustment
),
687 IRRECO_DEBUG( "value %f, upper %f\n", value
, upper
);
689 vscroll
= gtk_scrolled_window_get_vscrollbar(
690 GTK_SCROLLED_WINDOW( priv
->scrolled_set
));
691 gtk_range_set_value( GTK_RANGE( vscroll
), upper
);