From afec45f07303a5b12779a5170e0b2abb2f6b2c95 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 30 May 2007 00:08:53 +0000 Subject: [PATCH] add a button for creating a theme archive, but it doesnt work yet --- src/handlers.c | 24 ++++++++ src/obconf.glade | 155 +++++++++++++++++++++++++++++++++++++++++++++++ src/strings.c | 3 + 3 files changed, 182 insertions(+) diff --git a/src/handlers.c b/src/handlers.c index 24f2acd..f446d8b 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -1326,3 +1326,27 @@ void on_install_theme_clicked(GtkButton *w, gpointer data) g_free(path); } } + +void on_install_archive_clicked(GtkButton *w, gpointer data) +{ + GtkWidget *d; + gint r; + gchar *path = NULL; + + d = gtk_file_chooser_dialog_new(_("Choose an Openbox theme"), + GTK_WINDOW(mainwin), + GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, + GTK_STOCK_OK, GTK_RESPONSE_OK, + GTK_STOCK_CANCEL, GTK_RESPONSE_NONE, + NULL); + + gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(d), FALSE); + r = gtk_dialog_run(GTK_DIALOG(d)); + if (r == GTK_RESPONSE_OK) + path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(d)); + gtk_widget_destroy(d); + + if (path != NULL) { + g_print("ok %s\n", path); + } +} diff --git a/src/obconf.glade b/src/obconf.glade index 03a6d91..825a3af 100644 --- a/src/obconf.glade +++ b/src/obconf.glade @@ -317,6 +317,161 @@ True + + + + True + False + 0 + + + + True + <span weight="bold">Create a Theme Archive</span> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + False + 0 + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-open + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Choose a theme to _archive... + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + 0 + True + True + + + + + 0 + False + True + + False diff --git a/src/strings.c b/src/strings.c index 493c531..77f66c5 100644 --- a/src/strings.c +++ b/src/strings.c @@ -10,6 +10,9 @@ gchar *s = N_(" "); gchar *s = N_("Install a New Theme"); gchar *s = N_(" "); gchar *s = N_("Choose a theme to _install..."); +gchar *s = N_("Create a Theme Archive"); +gchar *s = N_(" "); +gchar *s = N_("Choose a theme to _archive..."); gchar *s = N_("Theme"); gchar *s = N_("Windows"); gchar *s = N_(" "); -- 2.34.1