From ff2eece69dee6f24cb9bb26e7bd60293717d4dca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pekka=20Geh=C3=B6r?= Date: Fri, 9 Jan 2009 09:20:39 +0200 Subject: [PATCH] Clean code --- irreco/src/core/irreco_theme_bg.c | 3 --- irreco/src/core/irreco_theme_manager_dlg.c | 21 +++++++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/irreco/src/core/irreco_theme_bg.c b/irreco/src/core/irreco_theme_bg.c index 0c071ca2..9489c0a0 100644 --- a/irreco/src/core/irreco_theme_bg.c +++ b/irreco/src/core/irreco_theme_bg.c @@ -168,8 +168,6 @@ void irreco_theme_bg_read(IrrecoThemeBg *self, const gchar *dir) } irreco_theme_bg_set(self, name, image); - - irreco_theme_bg_print(self); end: @@ -194,7 +192,6 @@ gboolean irreco_theme_bg_save(IrrecoThemeBg *self, const gchar *path) gchar *cp_cmd; gchar *type; GString *image_name; - IRRECO_ENTER keyfile = g_key_file_new(); diff --git a/irreco/src/core/irreco_theme_manager_dlg.c b/irreco/src/core/irreco_theme_manager_dlg.c index 83e30343..f89d162e 100644 --- a/irreco/src/core/irreco_theme_manager_dlg.c +++ b/irreco/src/core/irreco_theme_manager_dlg.c @@ -916,14 +916,19 @@ static void irreco_theme_manager_dlg_new_theme(GtkButton *button, IrrecoTheme *new_theme = NULL; gchar *rm_dir; gchar *temp_dir; - /* Create temp theme */ + /* Create temp theme folder */ temp_dir = g_strconcat("cp -f -r ", self->theme->path->str, " ", - "/media/mmc1/irreco/temp", NULL); + "/media/mmc2/irreco/irreco_temp", NULL); + rm_dir = g_strconcat("rm -f -r ", + "/media/mmc2/irreco/irreco_temp", NULL); + /* Delete temp dir */ + if (irreco_is_dir("/media/mmc2/irreco/irreco_temp")) { + system(rm_dir); + } system(temp_dir); - rm_dir = g_strconcat("rm -f -r ", "/media/mmc1/irreco/temp", NULL); - - new_theme = irreco_theme_new_from_dir("/media/mmc1/irreco/temp"); + new_theme = irreco_theme_new_from_dir( + "/media/mmc2/irreco/irreco_temp"); irreco_theme_set(new_theme, self->theme->name->str, self->theme->path->str, @@ -941,15 +946,14 @@ static void irreco_theme_manager_dlg_new_theme(GtkButton *button, self->irreco_data, new_theme)) { self->theme = irreco_theme_copy(new_theme); gtk_button_clicked(GTK_BUTTON(self->refresh_button)); - } /* remove temp theme */ system(rm_dir); + g_free(rm_dir); g_free(temp_dir); irreco_theme_free(new_theme); } - IRRECO_RETURN } @@ -970,7 +974,6 @@ static void irreco_theme_manager_dlg_new_theme(GtkButton *button, */ static void irreco_theme_manager_dlg_clean_details(IrrecoThemeManagerDlg *self) { - IRRECO_ENTER gtk_widget_show_all(GTK_WIDGET(self)); @@ -991,7 +994,6 @@ static void irreco_theme_manager_dlg_clean_details(IrrecoThemeManagerDlg *self) gtk_widget_hide(self->theme_info_alignment); gtk_widget_show(self->select_label); - IRRECO_RETURN } @@ -1006,7 +1008,6 @@ irreco_theme_manager_dlg_row_is_loaded(IrrecoThemeManagerDlg *self, GtkTreeIter *iter) { gint i; - IRRECO_ENTER gtk_tree_model_get(GTK_TREE_MODEL(self->tree_store), -- 2.11.4.GIT