From 5142b66e0e23e98489f3c4d02a8f16b41293ec82 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 31 May 2007 06:10:02 +0000 Subject: [PATCH] small cleanup for themes.c --- src/desktops.h | 19 +++++++++++++++++++ src/main.c | 3 +-- src/theme.c | 6 ++++-- src/theme.h | 6 +++--- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/desktops.h b/src/desktops.h index 96acc0c..1ba3e36 100644 --- a/src/desktops.h +++ b/src/desktops.h @@ -1,3 +1,22 @@ +/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- + + desktops.h for ObConf, the configuration tool for Openbox + Copyright (c) 2003-2007 Dana Jansens + Copyright (c) 2003 Tim Riley + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + See the COPYING file for a copy of the GNU General Public License. +*/ + #ifndef obconf__desktops_h #define obconf__desktops_h diff --git a/src/main.c b/src/main.c index 8e55c87..f038a1b 100644 --- a/src/main.c +++ b/src/main.c @@ -156,8 +156,7 @@ int main(int argc, char **argv) g_free(s); } - theme_setup_names(get_widget("theme_names")); - + theme_setup_tab(); appearance_setup_tab(); behavior_setup_tab(); diff --git a/src/theme.c b/src/theme.c index 997c8bb..a6e297f 100644 --- a/src/theme.c +++ b/src/theme.c @@ -34,14 +34,17 @@ static void reset_theme_names(GtkWidget *w); static void on_theme_names_selection_changed(GtkTreeSelection *sel, gpointer data); -void theme_setup_names(GtkWidget *w) +void theme_setup_tab() { GtkCellRenderer *render; GtkTreeViewColumn *column; GtkTreeSelection *select; + GtkWidget *w; mapping = TRUE; + w = get_widget("theme_names"); + /* widget setup */ theme_store = gtk_list_store_new(2, G_TYPE_STRING, GDK_TYPE_PIXBUF); gtk_tree_view_set_model(GTK_TREE_VIEW(w), GTK_TREE_MODEL(theme_store)); @@ -64,7 +67,6 @@ void theme_setup_names(GtkWidget *w) ("Preview", render, "pixbuf", 1, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(w), column); - /* setup the selection handler */ select = gtk_tree_view_get_selection(GTK_TREE_VIEW (w)); gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE); diff --git a/src/theme.h b/src/theme.h index 182ff8f..4acc72c 100644 --- a/src/theme.h +++ b/src/theme.h @@ -20,10 +20,10 @@ #ifndef obconf__theme_h #define obconf__theme_h -#include +#include -void theme_setup_names (GtkWidget *w); +void theme_setup_tab(); -void theme_install (const gchar *path); +void theme_install(const gchar *path); #endif -- 2.39.2