clean code and changed version nro.
[irreco.git] / irreco / src / core / irreco_theme_manager_dlg.h
blobadd99903d26cceab218b8d095bd0f1c291e5ba6a
1 /*
2 * irreco - Ir Remote Control
3 * Copyright (C) 2008 Pekka Gehör (pegu6@msn.com)
4 * Joni Kokko (t5kojo01@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 /**
22 * @addtogroup IrrecoThemeManagerDlg
23 * @{
26 /**
27 * @file
28 * Header file of @ref IrrecoThemeManagerDlg.
31 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
32 /* Typedef */
33 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
35 * Make sure that typedefs are available before we include anything elese.
37 * This makes sure that whatever other structures that depend on structures
38 * defined in this file will compile OK recardles of header inclusion order.
41 #ifndef __IRRECO_THEME_MANAGER_DLG_H_TYPEDEF__
42 #define __IRRECO_THEME_MANAGER_DLG_H_TYPEDEF__
46 #define IRRECO_TYPE_THEME_MANAGER_DLG irreco_theme_manager_dlg_get_type()
47 #define IRRECO_THEME_MANAGER_DLG(obj) \
48 (G_TYPE_CHECK_INSTANCE_CAST ((obj), IRRECO_TYPE_THEME_MANAGER_DLG,\ IrrecoThemeManagerDlg))
49 #define IRRECO_THEME_MANAGER_DLG_CLASS(klass) \
50 (G_TYPE_CHECK_CLASS_CAST ((klass), IRRECO_TYPE_THEME_MANAGER_DLG,\ IrrecoThemeManagerDlgClass))
51 #define IRRECO_IS_THEME_MANAGER_DLG(obj) \
52 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IRRECO_TYPE_THEME_MANAGER_DLG))
53 #define IRRECO_IS_THEME_MANAGER_DLG_CLASS(klass) \
54 (G_TYPE_CHECK_CLASS_TYPE ((klass), IRRECO_TYPE_THEME_MANAGER_DLG))
55 #define IRRECO_THEME_MANAGER_DLG_GET_CLASS(obj) \
56 (G_TYPE_INSTANCE_GET_CLASS ((obj), IRRECO_TYPE_THEME_MANAGER_DLG, \ IrrecoThemeManagerDlgClass))
60 #define IRRECO_TYPE_THEME_MANAGER_DLG (irreco_theme_manager_dlg_get_type ())
61 #define IRRECO_THEME_MANAGER_DLG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
62 IRRECO_TYPE_THEME_MANAGER_DLG, IrrecoThemeManagerDlg))
63 #define IRRECO_THEME_MANAGER_DLG_CLASS(klass) \
64 (G_TYPE_CHECK_CLASS_CAST ((klass), IRRECO_TYPE_THEME_MANAGER_DLG, \
65 IrrecoThemeManagerDlgClass))
66 #define IRRECO_IS_THEME_MANAGER_DLG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
67 IRRECO_TYPE_THEME_MANAGER_DLG))
68 #define IRRECO_IS_THEME_MANAGER_DLG_CLASS(klass) \
69 (G_TYPE_CHECK_CLASS_TYPE ((klass), IRRECO_TYPE_THEME_MANAGER_DLG))
70 #define IRRECO_THEME_MANAGER_DLG_GET_CLASS(obj) \
71 (G_TYPE_INSTANCE_GET_CLASS ((obj), IRRECO_TYPE_THEME_MANAGER_DLG, \
72 IrrecoThemeManagerDlgClass))
78 typedef struct _IrrecoThemeManagerDlg IrrecoThemeManagerDlg;
79 typedef struct _IrrecoThemeManagerDlgClass IrrecoThemeManagerDlgClass;
81 #endif /* __IRRECO_THEME_MANAGER_DLG_H_TYPEDEF__ */
85 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
86 /* Include */
87 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
88 #ifndef __IRRECO_THEME_MANAGER_DLG_H__
89 #define __IRRECO_THEME_MANAGER_DLG_H__
90 #include "irreco.h"
91 /*#include "irreco_dlg.h"*/
92 #include "irreco_data.h"
93 #include "irreco_internal_dlg.h"
94 #include "irreco_internal_widget.h"
95 #include "irreco_theme_upload_dlg.h"
96 #include "irreco_webdb_cache.h"
97 #include "irreco_theme_creator_dlg.h"
98 #include "irreco_theme_save_dlg.h"
100 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
101 /* Datatypes */
102 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
104 struct _IrrecoThemeManagerDlg {
106 IrrecoInternalDlg parent;
107 IrrecoTheme *theme;
108 IrrecoData *irreco_data;
110 GtkWidget *theme_image;
111 GtkWidget *banner;
112 GtkTreeStore *tree_store;
113 GtkTreeView *tree_view;
114 GtkWidget *preview;
115 GdkPixbuf *preview_button;
117 /* For WebdbTheme */
118 IrrecoWebdbTheme *webdb_theme;
119 GtkTreeStore *version_store;
120 gint selected_theme_id;
121 gchar* theme_folder;
122 GtkWidget *download_dialog;
123 gint theme_loader_index;
125 /* For ThemeManager UI*/
126 GtkWidget *theme_comment;
127 GtkWidget *theme_creator;
128 GtkWidget *theme_downloaded;
129 GtkWidget *theme_info_alignment;
130 GtkWidget *theme_name;
131 GtkWidget *theme_version;
132 GtkWidget *label_creator;
133 GtkWidget *label_download;
134 GtkWidget *combobox;
135 /*Buttons*/
136 GtkWidget *refresh_button;
137 GtkWidget *upload_button;
138 GtkWidget *download_button;
139 GtkWidget *clear_button;
140 GtkWidget *new_button;
141 GtkWidget *edit_button;
143 GtkWidget *select_label;
144 GtkWidget *label_combobox;
145 GtkWidget *config_uploaded;
146 GtkWidget *config_download_count;
147 gint loader_func_id;
148 gint loader_state;
149 gint loader_pos;
150 gchar *preview_add;
151 gchar *delete_theme_name;
153 /** The loaded items are childern of this iter.*/
154 GtkTreeIter *loader_parent_iter;
155 GtkTreeIter *loader_iter;
160 struct _IrrecoThemeManagerDlgClass {
161 IrrecoInternalDlgClass parent_class;
164 struct _IrrecoThemeManagerDlgClass {
165 IrrecoInternalDlgClass parent_class;
166 };*/
168 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
169 /* Macro */
170 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
173 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
174 /* Prototypes */
175 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
176 GType irreco_theme_manager_dlg_get_type(void);
177 GtkWidget *irreco_theme_manager_dlg_new(IrrecoData *irreco_data,
178 GtkWindow *parent);
179 void irreco_theme_manager_dlg_set_irreco_data(IrrecoThemeManagerDlg *self,
180 IrrecoData *irreco_data);
181 void irreco_show_theme_manager_dlg(IrrecoData *irreco_data, GtkWindow *parent);
183 #endif /* __IRRECO_THEME_MANAGER_DLG_H__ */
185 /** @} */