2 * irreco - Ir Remote Control
3 * Copyright (C) 2007 Arto Karppinen (arto.karppinen@iki.fi),
4 * Harri Vattulainen (t5vaha01@students.oamk.fi)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #include "irreco_style_browser_dlg.h"
22 #include "irreco_scrolled_window.h"
23 #include <hildon/hildon-banner.h>
26 * @typedef IrrecoStyleBrowser
28 * Dialog which displays a list of button styles to the user, so the user
32 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
34 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
36 irreco_style_browser_dlg_loading_loop(IrrecoStyleBrowserDlgLoading *loading);*/
38 static void irreco_style_browser_dlg_button_click(IrrecoButton
*irreco_button
,
39 IrrecoStyleBrowserDlg
*self
);
40 static gboolean
irreco_style_browser_dlg_map_event(IrrecoStyleBrowserDlg
*self
,
44 irreco_style_browser_dlg_configure_event(IrrecoStyleBrowserDlg *self,
45 GdkEventConfigure *event,
46 gpointer user_data);*/
47 static void irreco_style_browser_dlg_name_loading_start(IrrecoStyleBrowserDlg
*self
);
48 static void irreco_style_browser_dlg_row_selected_event(GtkTreeSelection
*sel
, IrrecoStyleBrowserDlg
*self
);
49 static gboolean
irreco_style_browser_dlg_loading_loop_name(IrrecoStyleBrowserDlgLoading
*loading
);
50 static gboolean
irreco_style_browser_dlg_loading_loop_pictures(IrrecoStyleBrowserDlgLoading
*loading
);
52 void irreco_style_browser_dlg_set_button_widget(IrrecoStyleBrowserDlg
*self
);
54 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
55 /* Construction & Destruction */
56 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
58 G_DEFINE_TYPE(IrrecoStyleBrowserDlg
, irreco_style_browser_dlg
, IRRECO_TYPE_DLG
)
60 static void irreco_style_browser_dlg_finalize(GObject
*object
)
63 G_OBJECT_CLASS(irreco_style_browser_dlg_parent_class
)->finalize(object
);
64 /*g_hash_table_destroy(IRRECO_STYLE_BROWSER_DLG(object)->layout_array);*/
68 static void irreco_style_browser_dlg_class_init(IrrecoStyleBrowserDlgClass
*klass
)
70 GObjectClass
*object_class
= G_OBJECT_CLASS(klass
);
71 object_class
->finalize
= irreco_style_browser_dlg_finalize
;
78 /* TODO heavy cleanup */
79 static void irreco_style_browser_dlg_init(IrrecoStyleBrowserDlg
*self
)
82 GtkWidget
*scrolled
; /* Scrollable widget that holds button pictures */
83 GtkTreeSelection
*select
; /* Selected item of treeview */
84 GtkWidget
*name_frame
; /* frame around theme names, is inside self->hbox */
85 GtkWidget
*pics_frame
; /* frame around button pics, is inside self->hbox */
86 GtkWidget
*name_alignment
; /* inside frame, holds treeviewhbox */
87 GtkWidget
*pics_alignment
;
88 GtkWidget
*scrolled_name
; /* holds treeview, scrollbar and is inside alignment */
91 /*IrrecoButtonBrowserWidget *button_widget;*/
95 /* Create array for irreco layouts. */
96 self
->layout_array
= g_hash_table_new_full(
97 g_direct_hash
, g_direct_equal
, NULL
,
98 G_DESTROYNOTIFY(irreco_button_layout_destroy
));
101 /* Construct dialog. */
102 gtk_window_set_title(GTK_WINDOW(self
), _("Style Browser"));
103 gtk_window_set_modal(GTK_WINDOW(self
), TRUE
);
104 gtk_window_set_destroy_with_parent(GTK_WINDOW(self
), TRUE
);
105 gtk_dialog_set_has_separator(GTK_DIALOG(self
), FALSE
);
106 gtk_dialog_add_buttons(GTK_DIALOG(self
),
107 GTK_STOCK_CANCEL
, GTK_RESPONSE_REJECT
,
111 self->button_widget = irreco_button_browser_widget_new(self->irreco_data);
115 /*gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(self)->vbox),
116 GTK_WIDGET(self->button_widget));*/
119 /* Create widgets. */
120 scrolled
= irreco_scrolled_window_new_with_autoresize(400, 700, 200, 400);
121 scrolled_name
= irreco_scrolled_window_new_with_autoresize(10, 700, 200, 400);
122 self
->vbox
= gtk_vbox_new(FALSE
, 10);
123 self
->vbox2
= gtk_vbox_new(FALSE
, 10);
124 self
->hbox
= gtk_hbox_new(FALSE
, 10);
127 padding
= irreco_gtk_pad(self
->vbox
, 8, 8, 8, 8);
128 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(self
)->vbox
), padding
);
131 pics_alignment
= gtk_alignment_new(0, 0, 0.8, 0.8);
132 gtk_alignment_set_padding(GTK_ALIGNMENT(pics_alignment
),
135 irreco_scrolled_window_add(IRRECO_SCROLLED_WINDOW(scrolled
),
136 GTK_WIDGET(self
->vbox2
));
138 gtk_container_add(GTK_CONTAINER(pics_alignment
),
139 GTK_WIDGET(scrolled
));
141 /* Create frames and put inside self->hbox and add alignment */
142 name_frame
= gtk_frame_new("");
143 gtk_frame_set_label_widget(GTK_FRAME(name_frame
),
144 irreco_gtk_label_bold("Themes", 0, 0, 0, 0, 0, 0));
146 name_alignment
= gtk_alignment_new(0, 0, 0, 0);
147 gtk_alignment_set_padding(GTK_ALIGNMENT(name_alignment
),
149 gtk_container_add(GTK_CONTAINER(name_frame
),
150 GTK_WIDGET(name_alignment
));
152 gtk_container_add(GTK_CONTAINER(name_alignment
),
153 GTK_WIDGET(scrolled_name
));
155 gtk_box_pack_start(GTK_BOX(self
->hbox
),
156 GTK_WIDGET(name_frame
),
160 pics_frame
= gtk_frame_new("");
161 gtk_frame_set_label_widget(GTK_FRAME(pics_frame
),
162 irreco_gtk_label_bold("Buttons", 0, 0, 0, 0, 0, 0));
164 gtk_box_pack_start(GTK_BOX(self
->hbox
),
165 GTK_WIDGET(pics_frame
),
168 /*pics_alignment = gtk_alignment_new(0, 0, 0, 0);
169 gtk_alignment_set_padding(GTK_ALIGNMENT(pics_alignment),
171 gtk_container_add(GTK_CONTAINER(pics_frame
),
172 GTK_WIDGET(pics_alignment
));
175 self
->listbox
= IRRECO_LISTBOX(
176 irreco_listbox_text_new_with_autosize(0, 700, 100, 450));
178 irreco_scrolled_window_add(IRRECO_SCROLLED_WINDOW(scrolled_name
),
179 GTK_WIDGET(self
->listbox
));
181 /* Add widgets to dialog. */
182 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(self
)->vbox
), GTK_WIDGET(self
->hbox
));
184 /* Setup the selection handler for list (TREE) */
185 select
= gtk_tree_view_get_selection(GTK_TREE_VIEW(self
->listbox
->tree_view
));
186 gtk_tree_selection_set_mode(select
, GTK_SELECTION_SINGLE
);
188 /* Signal handlers. */
189 g_signal_connect(G_OBJECT(self
), "map-event",
190 G_CALLBACK(irreco_style_browser_dlg_map_event
), NULL
);
192 g_signal_connect(G_OBJECT (select
), "changed",
193 G_CALLBACK (irreco_style_browser_dlg_row_selected_event
),
196 /* Show dialog, hopefully on the left-top corner of the screen. */
197 gtk_widget_show_all(GTK_WIDGET(self
));
199 gtk_window_move(GTK_WINDOW(self
), 80, 60);
204 GtkWidget
* irreco_style_browser_dlg_new(IrrecoData
*irreco_data
,
207 IrrecoStyleBrowserDlg
*self
;
210 self
= g_object_new(IRRECO_TYPE_STYLE_BROWSER_DLG
, NULL
);
212 irreco_dlg_set_parent(IRRECO_DLG(self
), parent
);
214 irreco_style_browser_dlg_set_irreco_data(self
, irreco_data
);
215 irreco_style_browser_dlg_set_button_widget(self
);
216 IRRECO_RETURN_PTR(self
);
221 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
222 /* Private Functions */
223 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
225 static void irreco_style_browser_dlg_add_style(IrrecoStyleBrowserDlg
*self
,
226 IrrecoButtonStyle
*style
)
231 IrrecoButtonLayout
*layout
;
234 /* Create widgets. */
236 label
= gtk_label_new(_("Normal button"));
238 label
= gtk_label_new(style
->name
);
240 hbox
= gtk_hbox_new(FALSE
, 10);
241 fixed
= gtk_fixed_new();
243 gtk_misc_set_alignment(GTK_MISC(label
), 0, 0.5);
244 gtk_box_pack_start(GTK_BOX(hbox
), fixed
, 0, 0, 0);
245 gtk_box_pack_end_defaults(GTK_BOX(hbox
), label
);
246 gtk_container_add(GTK_CONTAINER(self
->vbox2
), hbox
);
247 gtk_widget_show_all(hbox
);
249 /* Create layout and setup callbacks. */
250 layout
= irreco_button_layout_create(fixed
, NULL
);
251 g_hash_table_insert(self
->layout_array
, layout
, layout
);
252 irreco_button_layout_set_press_callback(layout
, irreco_button_down
);
253 irreco_button_layout_set_release_callback(
254 layout
, irreco_style_browser_dlg_button_click
);
255 irreco_button_layout_set_callback_data(layout
, self
);
258 irreco_button_create(layout
, 0, 0, _("Select"), style
, NULL
);
259 irreco_button_layout_create_widgets(layout
);
263 /* TODO replace by irreco_style_browser_dlg_name_loading_start */
265 static void irreco_style_browser_dlg_loading_start(IrrecoStyleBrowserDlg
*self
)
269 if (self
->loading
== NULL
) {
270 self
->loading
= g_slice_new0(IrrecoStyleBrowserDlgLoading
);
271 self
->loading
->self
= self
;
272 self
->loading
->len
= irreco_string_table_lenght(
273 self
->irreco_data
->button_style_array
);
274 self
->loading
->banner
= hildon_banner_show_progress(
275 GTK_WIDGET(self
), NULL
, "Loading");
276 hildon_banner_set_fraction(HILDON_BANNER(self
->loading
->banner
),
277 (float) 1 / (float) self
->loading
->len
);
278 g_hash_table_remove_all(self
->layout_array
);
280 /* Add GtkButton layout. */
281 irreco_style_browser_dlg_add_style(self
, NULL
);
282 g_idle_add(G_SOURCEFUNC(irreco_style_browser_dlg_loading_loop
),
289 static void irreco_style_browser_dlg_loading_cancel(IrrecoStyleBrowserDlg
*self
)
292 if (self
->loading
!= NULL
) self
->loading
->self
= NULL
;
299 irreco_style_browser_dlg_loading_loop(IrrecoStyleBrowserDlgLoading
*loading
)
305 /* Use has closed the dialog before the loading has been completed.
306 When we hit this, Gtk has already destroyed the dialog, so all we
307 need to do is to realease the loading strucure.*/
308 if (loading
->self
== NULL
) {
309 IRRECO_DEBUG("Cancelling style loading.\n");
310 g_slice_free(IrrecoStyleBrowserDlgLoading
, loading
);
311 IRRECO_RETURN_BOOL(FALSE
);
313 } else if (irreco_string_table_index(
314 loading
->self
->irreco_data
->button_style_array
,
315 loading
->pos
, &key
, &style
)) {
316 IRRECO_DEBUG("Loading style \"%s\".\n", key
);
317 irreco_style_browser_dlg_add_style(loading
->self
,
318 (IrrecoButtonStyle
*) style
);
319 loading
->pos
= loading
->pos
+ 1;
320 hildon_banner_set_fraction(HILDON_BANNER(loading
->banner
),
321 (float) 1 / (float) loading
->len
322 * (float) loading
->pos
);
323 IRRECO_RETURN_BOOL(TRUE
);
326 IRRECO_DEBUG("Loading complete. Cleaning up.\n");
327 gtk_widget_destroy(loading
->banner
);
328 loading
->self
->loading
= NULL
;
329 loading
->banner
= NULL
;
331 g_slice_free(IrrecoStyleBrowserDlgLoading
, loading
);
332 IRRECO_RETURN_BOOL(FALSE
);
338 /* Start loading names to treeview */
339 /* Really done like this? Look example somewhere */
340 static void irreco_style_browser_dlg_name_loading_start(IrrecoStyleBrowserDlg
*self
)
344 g_print("\nlengHT\n%d\n\n", irreco_string_table_lenght(self
->irreco_data
->theme_manager
->themes
));
346 if (self
->loading
== NULL
) {
347 self
->loading
= g_slice_new0(IrrecoStyleBrowserDlgLoading
);
348 self
->loading
->self
= self
;
349 self
->loading
->len
= irreco_string_table_lenght(
350 self
->irreco_data
->theme_manager
->themes
);
351 self
->loading
->banner
= hildon_banner_show_progress(
352 GTK_WIDGET(self
), NULL
, "Loading");
353 hildon_banner_set_fraction(HILDON_BANNER(self
->loading
->banner
),
354 (float) 1 / (float) self
->loading
->len
);
355 g_hash_table_remove_all(self
->layout_array
);
357 /* Add GtkButton layout. */
358 /*irreco_style_browser_dlg_add_style(self, NULL);*/
359 g_idle_add(G_SOURCEFUNC(irreco_style_browser_dlg_loading_loop_name
),
365 /* Called when theme name is selected */
366 /* Start loading button pictures to "scrolled" */
367 static void irreco_style_browser_dlg_button_loading_start(IrrecoStyleBrowserDlg
*self
)
371 if (self
->loading
== NULL
) {
372 self
->loading
= g_slice_new0(IrrecoStyleBrowserDlgLoading
);
373 self
->loading
->self
= self
;
374 /*self->loading->len = irreco_string_table_lenght(
375 self->irreco_data->button_style_array);*/
376 self
->loading
->len
= irreco_string_table_lenght(
377 self
->loading
->self
->buttons_table
);
378 self
->loading
->banner
= hildon_banner_show_progress(
379 GTK_WIDGET(self
), NULL
, "Loading");
380 hildon_banner_set_fraction(HILDON_BANNER(self
->loading
->banner
),
381 (float) 1 / (float) self
->loading
->len
);
383 /* TODO FIXME Clear button array, neither works */
384 /*g_hash_table_unref(self->layout_array);
385 self->layout_array = g_hash_table_new_full(
386 g_direct_hash, g_direct_equal, NULL,
387 G_DESTROYNOTIFY(irreco_button_layout_destroy));*/
388 /*g_hash_table_remove_all(self->layout_array);*/
390 /* TODO FIXME Creates default button, that should be at default theme */
391 /* In case of no themes installed happens wut? */
392 /* Add GtkButton layout. */
393 /*irreco_style_browser_dlg_add_style(self, NULL);*/
395 g_hash_table_remove_all(self
->layout_array
);
397 g_idle_add(G_SOURCEFUNC(irreco_style_browser_dlg_loading_loop_pictures
),
406 irreco_style_browser_dlg_loading_loop_name(IrrecoStyleBrowserDlgLoading
*loading
)
412 /* UseR has closed the dialog before the loading has been completed.
413 When we hit this, Gtk has already destroyed the dialog, so all we
414 need to do is to re_lease the loading strucTure.*/
415 if (loading
->self
== NULL
) {
416 IRRECO_DEBUG("Cancelling theme name loading.\n");
417 g_slice_free(IrrecoStyleBrowserDlgLoading
, loading
);
418 IRRECO_RETURN_BOOL(FALSE
);
420 } else if (irreco_string_table_index(
421 loading
->self
->irreco_data
->theme_manager
->themes
,
422 loading
->pos
, &key
, &style
)) {
423 GString
*str
= g_string_new(NULL
);
424 IRRECO_DEBUG("Loading theme name \"%s\".\n", key
);
425 g_string_append_printf(str
, "%s", key
);
426 irreco_listbox_text_append(IRRECO_LISTBOX_TEXT(
427 loading
->self
->listbox
),
428 str
->str
, loading
->self
->irreco_data
);
430 loading
->pos
= loading
->pos
+ 1;
431 hildon_banner_set_fraction(HILDON_BANNER(loading
->banner
),
432 (float) 1 / (float) loading
->len
433 * (float) loading
->pos
);
435 IRRECO_RETURN_BOOL(TRUE
);
438 IRRECO_DEBUG("Loading theme name complete. Cleaning up.\n");
439 gtk_widget_destroy(loading
->banner
);
440 loading
->self
->loading
= NULL
;
441 loading
->banner
= NULL
;
443 g_slice_free(IrrecoStyleBrowserDlgLoading
, loading
);
444 IRRECO_RETURN_BOOL(FALSE
);
451 irreco_style_browser_dlg_loading_loop_pictures(IrrecoStyleBrowserDlgLoading
*loading
)
454 IrrecoThemeButton
*style
;
455 IrrecoButtonStyle
*oldstyle
= NULL
;
457 oldstyle
= g_slice_new0(IrrecoButtonStyle
);
458 /* Use has closed the dialog before the loading has been completed.
459 When we hit this, Gtk has already destroyed the dialog, so all we
460 need to do is to realease the loading strucure.*/
461 if (loading
->self
== NULL
) {
462 IRRECO_DEBUG("Cancelling buttons loading.\n");
463 g_slice_free(IrrecoStyleBrowserDlgLoading
, loading
);
464 IRRECO_RETURN_BOOL(FALSE
);
466 } else if (irreco_string_table_index(
467 loading
->self
->buttons_table
,
468 loading
->pos
, &key
, (gpointer
*)&style
)){
469 /* Print identical and valid key and button name */
470 IRRECO_DEBUG("Loading button \"%s\".\n", key
);
471 IRRECO_DEBUG("Button name \"%s\".\n", style
->name
->str
);
473 oldstyle
->name
= style
->name
->str
;
474 oldstyle
->up
= style
->image_up
->str
;
475 oldstyle
->down
= style
->image_down
->str
;
476 oldstyle
->text_format_up
= style
->text_format_up
->str
;
477 oldstyle
->text_format_down
= style
->text_format_down
->str
;
478 oldstyle
->allow_text
= style
->allow_text
;
479 oldstyle
->text_padding
= style
->text_padding
;
480 irreco_style_browser_dlg_add_style(loading
->self
,
481 (IrrecoButtonStyle
*) oldstyle
);
482 loading
->pos
= loading
->pos
+ 1;
483 hildon_banner_set_fraction(HILDON_BANNER(loading
->banner
),
484 (float) 1 / (float) loading
->len
485 * (float) loading
->pos
);
486 IRRECO_RETURN_BOOL(TRUE
);
489 IRRECO_DEBUG("Loading buttons complete. Cleaning up.\n");
490 gtk_widget_destroy(loading
->banner
);
491 loading
->self
->loading
= NULL
;
492 loading
->banner
= NULL
;
494 g_slice_free(IrrecoStyleBrowserDlgLoading
, loading
);
495 IRRECO_RETURN_BOOL(FALSE
);
502 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
504 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
506 void irreco_style_browser_dlg_set_irreco_data(IrrecoStyleBrowserDlg
*self
,
507 IrrecoData
*irreco_data
)
510 self
->irreco_data
= irreco_data
;
514 void irreco_style_browser_dlg_set_button_widget(IrrecoStyleBrowserDlg
*self
)
518 self
->button_widget
= irreco_button_browser_widget_new(self
->irreco_data
);
520 gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(self
)->vbox
),
521 GTK_WIDGET(self
->button_widget
));
523 /* Signal handlers. */
524 /*g_signal_connect(G_OBJECT(self), "map-event",
525 G_CALLBACK(irreco_style_browser_dlg_map_event), NULL);*/
526 gtk_widget_show_all(GTK_WIDGET(self
));
531 gboolean
irreco_show_style_browser_dlg(IrrecoData
*irreco_data
,
533 IrrecoButtonStyle
**style
)
536 IrrecoStyleBrowserDlg
*self
;
539 self
= IRRECO_STYLE_BROWSER_DLG(irreco_style_browser_dlg_new(
540 irreco_data
, parent
));
541 response
= gtk_dialog_run(GTK_DIALOG(self
));
542 irreco_style_browser_dlg_loading_cancel(self
);
544 if (response
== 1) *style
= self
->style
;
545 gtk_widget_destroy(GTK_WIDGET(self
));
547 if (response
== 1) IRRECO_RETURN_BOOL(TRUE
);
548 IRRECO_RETURN_BOOL(FALSE
);
553 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
554 /* Events and Callbacks */
555 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
556 /* TODO TODO TODO enable and add signal handler to this */
558 static void irreco_style_browser_dlg_button_click(IrrecoButton
*irreco_button
,
559 IrrecoStyleBrowserDlg
*self
)
562 self
->style
= irreco_button
->style
;
563 gtk_dialog_response(GTK_DIALOG(self
), 1);
569 /*static gboolean irreco_style_browser_dlg_map_event(IrrecoStyleBrowserDlg *self,
574 irreco_style_browser_dlg_loading_start(self);
575 IRRECO_RETURN_BOOL(FALSE);
579 /* Dialog is shown so start loading theme names by calling ...name_loading_start */
581 static gboolean
irreco_style_browser_dlg_map_event(IrrecoStyleBrowserDlg
*self
,
586 irreco_style_browser_dlg_name_loading_start(self
);
587 IRRECO_RETURN_BOOL(FALSE
);
592 /* Handling signal that is emitted when theme name is clicked, this calls
593 irreco_style_browser_dlg_button_loading_start which resets everything and
594 starts idling through pictures at irreco_style_browser_dlg_loading_loop_pictures */
595 static void irreco_style_browser_dlg_row_selected_event(GtkTreeSelection
*selection
,
596 IrrecoStyleBrowserDlg
*self
)
598 /*irreco_style_browser_dlg_button_loading_start(self);*/
600 gchar
*sel_label
= NULL
;
601 /*IrrecoStringTable *buttons_table;*/
609 irreco_listbox_get_selection(IRRECO_LISTBOX(self
->listbox
),
610 NULL
, &sel_label
, NULL
);
611 g_print("\n laabeli: %s\n\n", sel_label
);
613 self
->buttons_table
= irreco_theme_manager_get_buttons(self
->irreco_data
->theme_manager
, sel_label
);
616 /* Sets iter to the currently selected node */
617 /*if (gtk_tree_selection_get_selected (sel, &model, &iter))
619 if(&iter == NULL) { g_print("\niter on null\n"); }
620 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 0, &theme_name, -1);
621 g_print("\nteeman nimi: %s \n\n", theme_name);
626 if(TRUE
) irreco_style_browser_dlg_button_loading_start(self
);
635 irreco_style_browser_dlg_configure_event(IrrecoStyleBrowserDlg *self,
636 GdkEventConfigure *event,
640 IRRECO_PRINTF("Dialog position x%i y%i\n", event->x, event->y);
641 IRRECO_RETURN_BOOL(FALSE);