1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
3 * irreco - Ir Remote Control
4 * Copyright (C) 2008 Pekka Gehör (pegu6@msn.com)
6 * irreco_theme_creator_dlg.c is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * irreco_theme_creator_dlg.c is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 #include "irreco_theme_creator_dlg.h"
21 #include "irreco_button_browser_dlg.h"
22 #include "irreco_theme_creator_backgrounds.h"
23 #include "irreco_theme_creator_buttons.h"
24 #include "irreco_background_creator_dlg.h"
25 #include "irreco_button_creator_dlg.h"
26 #include <hildon/hildon-banner.h>
27 #include <hildon/hildon-color-button.h>
28 #include <hildon/hildon-file-chooser-dialog.h>
29 #include "irreco_theme_upload_dlg.h"
33 * @addtogroup IrrecoThemeCreatorDlg
42 * Source file of @ref IrrecoThemeCreatorDlg.
44 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
46 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
48 #define IRRECO_BUTTON_PREVIEW_WIDHT (IRRECO_SCREEN_WIDTH / 6)
49 #define IRRECO_BUTTON_PREVIEW_HEIGHT (IRRECO_SCREEN_HEIGHT / 6)
72 LOADER_STATE_BACKGROUNDS
,
76 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
78 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
80 static void _loader_start(IrrecoThemeCreatorDlg
*self
, GSourceFunc function
);
81 static void _loader_stop(IrrecoThemeCreatorDlg
*self
);
82 static void irreco_theme_creator_dlg_preview_image(GtkWidget
*widget
,
83 GdkEventButton
*event
,
84 IrrecoThemeCreatorDlg
*self
);
87 irreco_theme_creator_dlg_notebook_changed(GtkNotebook
*notebook
,
88 GtkNotebookPage
*page
,
90 IrrecoThemeCreatorDlg
*self
);
93 irreco_theme_creator_dlg_display_theme_detail(IrrecoThemeCreatorDlg
*self
,
95 static void irreco_theme_creator_dlg_new_bg_button(GtkButton
*button
,
96 IrrecoThemeCreatorDlg
*self
);
97 static void irreco_theme_creator_dlg_edit_bg_button(GtkButton
*button
,
98 IrrecoThemeCreatorDlg
*self
);
99 static void _set_preview(IrrecoThemeCreatorDlg
*self
);
101 static void irreco_theme_creator_dlg_delete_bg_button(GtkButton
*button
,
102 IrrecoThemeCreatorDlg
*self
);
104 static void _set_banner(IrrecoThemeCreatorDlg *self,
107 static void _hide_banner(IrrecoThemeCreatorDlg *self);
109 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
110 /* Construction & Destruction */
111 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
114 * @name Construction & Destruction
118 G_DEFINE_TYPE(IrrecoThemeCreatorDlg
, irreco_theme_creator_dlg
,
119 IRRECO_TYPE_INTERNAL_DLG
)
121 static void irreco_theme_creator_dlg_constructed(GObject
*object
)
123 /* TODO: Add initialization code here */
125 IrrecoData
*irreco_data
;
126 IrrecoThemeCreatorDlg
*self
;
129 GtkWidget
*table_about
;
130 GtkWidget
*label_author
;
131 GtkWidget
*label_name
;
132 GtkWidget
*frame_comments
;
133 GtkWidget
*scrolled_comments
;
135 GtkWidget
*preview_button_frame
;
141 G_OBJECT_CLASS(irreco_theme_creator_dlg_parent_class
)->constructed(object
);
142 self
= IRRECO_THEME_CREATOR_DLG(object
);
143 irreco_data
= irreco_internal_dlg_get_irreco_data(IRRECO_INTERNAL_DLG(self
));
145 /* Construct dialog. */
146 gtk_window_set_title(GTK_WINDOW(self
), _("Theme Creator "));
147 gtk_window_set_modal(GTK_WINDOW(self
), TRUE
);
148 gtk_window_set_destroy_with_parent(GTK_WINDOW(self
), TRUE
);
149 gtk_dialog_set_has_separator(GTK_DIALOG(self
), FALSE
);
152 self
->cancel_button
= gtk_dialog_add_button (GTK_DIALOG(self
),
154 GTK_RESPONSE_CANCEL
);
155 self
->save_button
= gtk_dialog_add_button (GTK_DIALOG(self
),
158 self
->add_button
= gtk_dialog_add_button (GTK_DIALOG(self
),
159 _("Add"), GTK_RESPONSE_NONE
);
160 self
->edit_button
= gtk_dialog_add_button (GTK_DIALOG(self
),
163 self
->delete_button
= gtk_dialog_add_button (GTK_DIALOG(self
),
168 /* Create widgets. */
169 self
->notebook
= gtk_notebook_new();
173 table_about
= gtk_table_new(7, 9, TRUE
);
174 label_author
= gtk_label_new(_("Author:"));
175 label_name
= gtk_label_new(_("Name: "));
176 self
->entry_author
= gtk_entry_new();
177 self
->entry_name
= gtk_entry_new();
178 frame_comments
= gtk_frame_new("");
179 scrolled_comments
= gtk_scrolled_window_new(NULL
, NULL
);
180 self
->textview_comments
= gtk_text_view_new();
181 preview_button_frame
= gtk_frame_new("");
182 self
->preview_event_box
= gtk_event_box_new();
183 self
->preview_image
= gtk_image_new();
184 gtk_image_set_from_file(GTK_IMAGE(self
->preview_image
), NULL
);
185 self
->hbox_backgrounds
= gtk_hbox_new(FALSE
, 2);
186 self
->hbox_buttons
= gtk_hbox_new(FALSE
, 2);
189 /* Set frame text bold */
190 gtk_frame_set_label_widget(GTK_FRAME(frame_comments
),
191 irreco_gtk_label_bold(
192 "Comments", 0, 0, 0, 0, 0, 0));
193 gtk_frame_set_label_widget(GTK_FRAME(preview_button_frame
),
194 irreco_gtk_label_bold(
195 "Preview button", 0, 0, 0, 0, 0, 0));
198 self
->backgrounds
= irreco_theme_creator_backgrounds_new(
203 /* Create Notebook tabs. */
205 gtk_notebook_append_page(GTK_NOTEBOOK(self
->notebook
),
206 irreco_gtk_align(GTK_WIDGET(table_about
),
207 0, 0, 1, 1, 8, 8, 8, 8),
208 gtk_label_new("About"));
209 gtk_notebook_append_page(GTK_NOTEBOOK(self
->notebook
),
210 irreco_gtk_align(GTK_WIDGET(self
->hbox_buttons
),
211 0, 0, 1, 1, 8, 8, 8, 8),
212 gtk_label_new("Buttons"));
213 gtk_notebook_append_page(GTK_NOTEBOOK(self
->notebook
),
214 irreco_gtk_align(GTK_WIDGET(
215 self
->hbox_backgrounds
),
216 0, 0, 1, 1, 8, 8, 8, 8),
217 gtk_label_new("Backgrounds"));
220 gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(self
)->vbox
),
224 /* Set widgets on the table_about */
226 gtk_table_set_row_spacings(GTK_TABLE(table_about
), 6);
227 gtk_table_set_col_spacings(GTK_TABLE(table_about
), 6);
229 gtk_table_attach_defaults(GTK_TABLE(table_about
),
230 label_author
, 0, 2, 0, 1);
231 gtk_table_attach_defaults(GTK_TABLE(table_about
),
232 label_name
, 0, 2, 1, 2);
233 gtk_table_attach_defaults(GTK_TABLE(table_about
),
234 self
->entry_author
, 2, 9, 0, 1);
235 gtk_table_attach_defaults(GTK_TABLE(table_about
),
236 self
->entry_name
, 2, 9, 1, 2);
237 gtk_table_attach_defaults(GTK_TABLE(table_about
),
238 frame_comments
, 0, 6, 2, 7);
239 gtk_table_attach_defaults(GTK_TABLE(table_about
),
240 preview_button_frame
, 6, 9, 2, 7);
244 /* set preview image*/
247 gtk_container_add(GTK_CONTAINER(preview_button_frame
),
248 self
->preview_event_box
);
249 gtk_container_add(GTK_CONTAINER(self
->preview_event_box
),
250 self
->preview_image
);
254 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(self
->textview_comments
),
257 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_comments
),
259 GTK_POLICY_AUTOMATIC
);
261 gtk_container_add(GTK_CONTAINER(frame_comments
), scrolled_comments
);
262 gtk_container_add(GTK_CONTAINER(scrolled_comments
),
263 self
->textview_comments
);
265 /* Signal handlers. */
267 g_signal_connect(G_OBJECT(self
->notebook
), "switch-page",
268 G_CALLBACK(irreco_theme_creator_dlg_notebook_changed
),
271 g_signal_connect(G_OBJECT(self
->preview_event_box
),
272 "button-release-event",
273 G_CALLBACK(irreco_theme_creator_dlg_preview_image
),
276 g_signal_connect(G_OBJECT(self
->add_button
), "clicked",
277 G_CALLBACK(irreco_theme_creator_dlg_new_bg_button
),
279 g_signal_connect(G_OBJECT(self
->edit_button
), "clicked",
280 G_CALLBACK(irreco_theme_creator_dlg_edit_bg_button
),
282 g_signal_connect(G_OBJECT(self
->delete_button
), "clicked",
283 G_CALLBACK(irreco_theme_creator_dlg_delete_bg_button
),
286 gtk_widget_show_all(GTK_WIDGET(self
));
292 static void irreco_theme_creator_dlg_init(IrrecoThemeCreatorDlg
*self
)
298 static void irreco_theme_creator_dlg_finalize(GObject
*object
)
300 IrrecoThemeCreatorDlg
*self
;
303 self
= IRRECO_THEME_CREATOR_DLG(object
);
305 G_OBJECT_CLASS(irreco_theme_creator_dlg_parent_class
)->finalize(object
);
312 irreco_theme_creator_dlg_class_init(IrrecoThemeCreatorDlgClass
*klass
)
314 GObjectClass
* object_class
= G_OBJECT_CLASS (klass
);
316 object_class
->finalize
= irreco_theme_creator_dlg_finalize
;
317 object_class
->constructed
= irreco_theme_creator_dlg_constructed
;
323 *irreco_theme_creator_dlg_new(IrrecoData
*irreco_data
, GtkWindow
*parent
)
325 IrrecoThemeCreatorDlg
*self
;
328 self
= g_object_new(IRRECO_TYPE_THEME_CREATOR_DLG
,
329 "irreco-data", irreco_data
,
331 /*self = g_object_new(IRRECO_TYPE_THEME_CREATOR_DLG, NULL);*/
332 irreco_dlg_set_parent(IRRECO_DLG(self
), parent
);
334 IRRECO_RETURN_PTR(self
);
339 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
340 /* Private Functions */
341 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
343 * @name Private Functions
347 /*static void _set_banner(IrrecoThemeCreatorDlg *self,
353 if (self->banner == NULL) {
354 self->banner = hildon_banner_show_progress(
355 GTK_WIDGET(self), NULL, "");
358 hildon_banner_set_text(HILDON_BANNER(self->banner), text);
359 hildon_banner_set_fraction(HILDON_BANNER(self->banner), fraction);
365 * Destroy banner, if it exists.
367 /*static void _hide_banner(IrrecoThemeCreatorDlg *self)
372 gtk_widget_destroy(self->banner);
379 * Start a loader state machine if one is not running already.
381 static void _loader_start(IrrecoThemeCreatorDlg
*self
, GSourceFunc function
)
385 if (self
->loader_func_id
== 0) {
386 self
->loader_func_id
= g_idle_add((GSourceFunc
)function
, self
);
393 * Stop and cleanup loader if a loader is running.
395 static void _loader_stop(IrrecoThemeCreatorDlg
*self
)
398 /*_hide_banner(self);*/
399 if (self
->loader_func_id
!= 0) {
400 g_source_remove(self
->loader_func_id
);
401 self
->loader_func_id
= 0;
402 self
->loader_state
= 0;
408 irreco_theme_creator_dlg_display_theme_detail(IrrecoThemeCreatorDlg
*self
,
414 IRRECO_PRINTF("Page_nro %d\n", page
);
417 IRRECO_RETURN_BOOL(TRUE
);
422 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
424 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
427 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
428 /* Public Functions */
429 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
432 irreco_theme_creator_dlg_run(GtkWindow
*parent_window
, IrrecoData
*irreco_data
,
433 IrrecoTheme
*irreco_theme
)
435 IrrecoThemeCreatorDlg
*self
;
437 gboolean loop
= TRUE
;
438 gboolean rvalue
= FALSE
;
440 GtkTextIter startiter
;
446 self
= (IrrecoThemeCreatorDlg
*)irreco_theme_creator_dlg_new(irreco_data
,
448 self
->parent_window
= GTK_WINDOW(self
);
449 self
->loader_func_id
= 0;
450 self
->irreco_data
= irreco_data
;
451 self
->preview_name
= NULL
;
453 /* Sets the theme details */
454 if(irreco_theme
!= NULL
) {
456 self
->theme
= irreco_theme
;
457 gtk_entry_set_text(GTK_ENTRY(self
->entry_name
),
458 self
->theme
->name
->str
);
459 gtk_entry_set_text(GTK_ENTRY(self
->entry_author
),
460 self
->theme
->author
->str
);
462 self
->buffer_comments
= gtk_text_view_get_buffer(
463 GTK_TEXT_VIEW(self
->textview_comments
));
464 gtk_text_buffer_set_text(GTK_TEXT_BUFFER(self
->buffer_comments
),
465 self
->theme
->comment
->str
,
467 self
->backgrounds
= irreco_theme_creator_backgrounds_new(
471 self
->buttons
= irreco_theme_creator_buttons_new(GTK_WINDOW(self
),
472 self
->irreco_data
, self
->theme
);
474 /* Set window title */
475 gtk_window_set_title(GTK_WINDOW(self
), _("Theme Editor "));
481 self
->backgrounds
= irreco_theme_creator_backgrounds_new(
485 self
->buttons
= irreco_theme_creator_buttons_new(GTK_WINDOW(self
),
486 self
->irreco_data
, NULL
);
490 gtk_container_add(GTK_CONTAINER(self
->hbox_buttons
),
492 gtk_container_add(GTK_CONTAINER(self
->hbox_backgrounds
),
496 response
= gtk_dialog_run(GTK_DIALOG(self
));
498 case GTK_RESPONSE_OK
:
500 self
->loader_state
= LOADER_STATE_INIT
;
501 _loader_start(self
, NULL
);
503 irreco_theme_set_author(self
->theme
, gtk_entry_get_text(
504 GTK_ENTRY(self
->entry_author
)));
506 irreco_theme_set_preview_button(self
->theme
,
507 self
->preview_button
->name
->str
);
510 /* Set new comments */
511 self
->buffer_comments
= gtk_text_view_get_buffer(
512 GTK_TEXT_VIEW(self
->textview_comments
));
514 gtk_text_buffer_get_start_iter(GTK_TEXT_BUFFER(
515 self
->buffer_comments
),
517 gtk_text_buffer_get_end_iter(GTK_TEXT_BUFFER(
518 self
->buffer_comments
),
520 irreco_theme_set_comment(self
->theme
,
521 gtk_text_buffer_get_text(
523 self
->buffer_comments
),
528 irreco_theme_update_keyfile(self
->theme
);
530 irreco_theme
= irreco_theme_copy(self
->theme
);
537 case GTK_RESPONSE_CANCEL
:
538 IRRECO_DEBUG("GTK_RESPONSE_CANCEL\n");
545 IRRECO_DEBUG("default\n");
551 gtk_widget_destroy(GTK_WIDGET(self
));
553 IRRECO_RETURN_BOOL(rvalue
);
557 * Update shown preview image
559 static void _set_preview(IrrecoThemeCreatorDlg
*self
)
563 /* if theme contains preview image, use it, else get first button */
564 if(self
->preview_name
) {
565 IRRECO_DEBUG("Preview set in dlg, using it\n");
566 } else if(strlen(self
->theme
->preview_button_name
->str
) != 0) {
568 IRRECO_DEBUG("Preview set to theme, using it\n");
569 strtblkey
= g_strdup_printf("%s/%s", self
->theme
->name
->str
,
570 self
->theme
->preview_button_name
->str
);
571 /*IRRECO_DEBUG("key: %s\n", strtblkey);*/
572 if(irreco_string_table_get(self
->theme
->buttons
, strtblkey
,
573 (gpointer
*) &self
->preview_button
)) {
574 self
->preview_name
= self
->preview_button
->image_up
->str
;
576 IRRECO_DEBUG("Theme preview set wrong\n");
580 IRRECO_DEBUG("No preview set, using first button of theme\n");
581 irreco_string_table_index(self
->theme
->buttons
, 0, &key
,
582 (gpointer
*) &self
->preview_button
);
583 if(self
->preview_button
) {
584 self
->preview_name
= self
->preview_button
->image_up
->str
;
588 gtk_image_set_from_file(GTK_IMAGE(self
->preview_image
),
591 gtk_widget_show_all(GTK_WIDGET(self
));
597 irreco_theme_creator_dlg_notebook_changed(GtkNotebook
*notebook
,
598 GtkNotebookPage
*page
,
600 IrrecoThemeCreatorDlg
*self
)
608 gtk_widget_show(self
->cancel_button
);
609 gtk_widget_show(self
->save_button
);
610 gtk_widget_hide(self
->add_button
);
611 gtk_widget_hide(self
->edit_button
);
612 gtk_widget_hide(self
->delete_button
);
614 irreco_theme_creator_dlg_display_theme_detail(self
, page_num
);
618 gtk_widget_hide(self
->cancel_button
);
619 gtk_widget_hide(self
->save_button
);
620 gtk_widget_show(self
->add_button
);
621 gtk_widget_show(self
->edit_button
);
622 gtk_widget_show(self
->delete_button
);
624 irreco_theme_creator_dlg_display_theme_detail(self
, page_num
);
625 gtk_widget_show_all(GTK_WIDGET(self
->buttons
));
629 gtk_widget_hide(self
->cancel_button
);
630 gtk_widget_hide(self
->save_button
);
631 gtk_widget_show(self
->add_button
);
632 gtk_widget_show(self
->edit_button
);
633 gtk_widget_show(self
->delete_button
);
635 irreco_theme_creator_dlg_display_theme_detail(self
, page_num
);
636 gtk_widget_show_all(GTK_WIDGET(self
->backgrounds
));
641 IRRECO_DEBUG("default\n");
648 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
649 /* Events and Callbacks */
650 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
653 * @name Events and Callbacks
657 static void irreco_theme_creator_dlg_preview_image(GtkWidget
*widget
,
658 GdkEventButton
*event
,
659 IrrecoThemeCreatorDlg
*self
)
662 IrrecoThemeButton
*preview_theme_button
= NULL
;
665 if (self
->theme
!= NULL
) {
666 preview_theme_button
= irreco_button_browser_dlg_run(
671 if(preview_theme_button
) {
672 IRRECO_DEBUG("Set preview button to theme and self->\n");
674 self
->preview_name
= preview_theme_button
->image_up
->str
;
675 IRRECO_PRINTF("BUTTON:%s\n", self
->preview_name
);
678 self
->preview_button
= preview_theme_button
;
689 *Create new background or button
692 static void irreco_theme_creator_dlg_new_bg_button(GtkButton
*button
,
693 IrrecoThemeCreatorDlg
*self
)
697 if (gtk_notebook_get_current_page(GTK_NOTEBOOK(
698 self
->notebook
))==BACKGROUNDS
) {
700 irreco_background_creator_dlg_run(self
->irreco_data
, NULL
,
701 GTK_WINDOW(self
), NULL
);
705 irreco_button_creator_dlg_run(self
->irreco_data
, NULL
,
706 GTK_WINDOW(self
), NULL
);
713 *Create edit background or button
716 static void irreco_theme_creator_dlg_edit_bg_button(GtkButton
*button
,
717 IrrecoThemeCreatorDlg
*self
)
723 /* Check which page */
724 if (gtk_notebook_get_current_page(GTK_NOTEBOOK(
725 self
->notebook
)) == BACKGROUNDS
) {
727 IrrecoThemeBg
*bg
= NULL
;
728 IrrecoThemeBg
*new_bg
= NULL
;
730 bg
= irreco_theme_creator_backgrounds_get_selected_bg(
731 IRRECO_THEME_CREATOR_BACKGROUNDS(self
->backgrounds
));
733 /* check whether the background image of the selected */
735 new_bg
= irreco_theme_bg_copy(bg
);
737 if (irreco_background_creator_dlg_run(self
->irreco_data
,
741 irreco_theme_bg_set(bg
, new_bg
->image_name
->str
, new_bg
->image_path
->str
);
742 irreco_theme_bg_free(new_bg
);
744 irreco_theme_creator_backgrounds_refresh_list(
745 IRRECO_THEME_CREATOR_BACKGROUNDS(self
->backgrounds
));
749 irreco_theme_bg_free(new_bg
);
754 IRRECO_DEBUG("the background is not selected\n");
761 IrrecoThemeButton
*button
= NULL
;
762 IrrecoThemeButton
*new_button
= NULL
;
764 button
= irreco_theme_creator_buttons_get_selected_button(
765 IRRECO_THEME_CREATOR_BUTTONS(self
->buttons
));
767 /* check whether the button image of the selected */
769 new_button
= irreco_theme_button_copy(button
);
771 new_button
= irreco_button_creator_dlg_run(self
->irreco_data
,
778 IRRECO_DEBUG("the button is not selected\n");
788 static void irreco_theme_creator_dlg_delete_bg_button(GtkButton
*button
,
789 IrrecoThemeCreatorDlg
*self
)
795 if (gtk_notebook_get_current_page(GTK_NOTEBOOK(
796 self
->notebook
)) == BACKGROUNDS
) {
798 irreco_theme_creator_backgrounds_remove_selected(
799 IRRECO_THEME_CREATOR_BACKGROUNDS(self
->backgrounds
));
803 irreco_theme_creator_buttons_remove_selected(
804 IRRECO_THEME_CREATOR_BUTTONS(self
->buttons
));