From 1d52c5a7d9962a287caa317aa1e0a5e5385a38cc Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 29 May 2007 21:41:35 +0000 Subject: [PATCH] add a dialog to install a theme. it doesnt do anything yet. --- src/handlers.c | 18 ++++++ src/main.c | 2 +- src/main.h | 1 + src/obconf.glade | 155 +++++++++++++++++++++++++++++++++++++++++++++++ src/strings.c | 3 + 5 files changed, 178 insertions(+), 1 deletion(-) diff --git a/src/handlers.c b/src/handlers.c index a734f3a..b4eab26 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -1264,3 +1264,21 @@ static void on_desktop_names_cell_edited(GtkCellRendererText *cell, set_desktop_names(); } + +void on_install_theme_clicked(GtkButton *w, gpointer data) +{ + GtkWidget *d; + gint r; + + d = gtk_file_chooser_dialog_new(_("Choose an Openbox theme"), + mainwin, + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_OK, GTK_RESPONSE_OK, + GTK_STOCK_CANCEL, GTK_RESPONSE_NONE, + NULL); + r = gtk_dialog_run(GTK_DIALOG(d)); + if (r == GTK_RESPONSE_OK) { + g_print("hi\n"); + } + gtk_widget_destroy(d); +} diff --git a/src/main.c b/src/main.c index 11836fd..104454e 100644 --- a/src/main.c +++ b/src/main.c @@ -25,7 +25,7 @@ #include #undef SN_API_NOT_YET_FROZEN -static GtkWidget *mainwin; +GtkWidget *mainwin; GladeXML *glade; xmlDocPtr doc; diff --git a/src/main.h b/src/main.h index 1514a85..7d1b119 100644 --- a/src/main.h +++ b/src/main.h @@ -27,6 +27,7 @@ extern GladeXML *glade; extern xmlDocPtr doc; extern xmlNodePtr root; +extern GtkWidget *mainwin; void obconf_error(gchar *msg); diff --git a/src/obconf.glade b/src/obconf.glade index e43d975..092cf79 100644 --- a/src/obconf.glade +++ b/src/obconf.glade @@ -162,6 +162,161 @@ True + + + + True + False + 0 + + + + True + <span weight="bold">Install a New Theme</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 install... + 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 566d119..6c94664 100644 --- a/src/strings.c +++ b/src/strings.c @@ -7,6 +7,9 @@ gchar *s = N_("Openbox Window Preferences"); gchar *s = N_("Theme"); gchar *s = N_(" "); +gchar *s = N_("Install a New Theme"); +gchar *s = N_(" "); +gchar *s = N_("_Choose a theme to install..."); gchar *s = N_("Theme"); gchar *s = N_("Windows"); gchar *s = N_(" "); -- 2.39.2