diff -Nru lxappearance-obconf-0.0.1/debian/changelog lxappearance-obconf-0.0.1/debian/changelog --- lxappearance-obconf-0.0.1/debian/changelog 2011-07-24 22:39:53.000000000 +0000 +++ lxappearance-obconf-0.0.1/debian/changelog 2011-08-22 20:52:46.000000000 +0000 @@ -1,3 +1,17 @@ +lxappearance-obconf (0.0.1-0ubuntu2~ppa1) oneiric; urgency=low + + * debian/patches: + - 0*-openbox-3.5.patch: Apply several patches from upstream to fix building + with openbox 3.5 (LP: #831095). + - 99-fix-translations.patch: Fix build with above patches. + * debian/rules: + - Use autoreconf with 01-openbox-3.5.patch. + - Create missing m4/ folder. + * debian/control: + - Bump build-depends on openbox (>= 3.5.0). + + -- Julien Lavergne Mon, 22 Aug 2011 20:50:18 +0200 + lxappearance-obconf (0.0.1-0ubuntu1) oneiric; urgency=low * New upstream release. diff -Nru lxappearance-obconf-0.0.1/debian/control lxappearance-obconf-0.0.1/debian/control --- lxappearance-obconf-0.0.1/debian/control 2010-11-13 18:20:30.000000000 +0000 +++ lxappearance-obconf-0.0.1/debian/control 2011-08-22 20:55:05.000000000 +0000 @@ -4,7 +4,7 @@ Maintainer: Julien Lavergne Build-Depends: debhelper (>= 7.0.50~), intltool (>= 0.40), - openbox-dev (>= 3.4.11), + openbox-dev (>= 3.5.0), libgtk2.0-dev (>= 2.6), libglib2.0-dev (>= 2.6), lxappearance-dev (>= 0.4.1), diff -Nru lxappearance-obconf-0.0.1/debian/patches/01-openbox-3.5.patch lxappearance-obconf-0.0.1/debian/patches/01-openbox-3.5.patch --- lxappearance-obconf-0.0.1/debian/patches/01-openbox-3.5.patch 1970-01-01 00:00:00.000000000 +0000 +++ lxappearance-obconf-0.0.1/debian/patches/01-openbox-3.5.patch 2011-08-22 18:41:52.000000000 +0000 @@ -0,0 +1,482 @@ +From 8f40b0cc691348ea3c8c09dd6cdb5837d44929c5 Mon Sep 17 00:00:00 2001 +From: Andrea Florio +Date: Sun, 7 Aug 2011 22:13:50 +0200 +Subject: [PATCH] make it build with openbox 3.5 + +--- + configure.ac | 2 +- + src/appearance.c | 24 ++++++++++++++++++------ + src/main.c | 22 ++++++++++++++++++---- + src/main.h | 11 ++++++----- + src/obconf.glade | 11 +++++++++-- + src/preview.c | 11 +++++++---- + src/preview.h | 5 +++-- + src/preview_update.c | 21 ++++++++++++++------- + src/preview_update.h | 5 +++-- + src/theme.c | 2 +- + src/tree.c | 34 ++++++++++++++++++++++------------ + src/tree.h | 4 +++- + 12 files changed, 105 insertions(+), 47 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 464d830..61c791e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -61,7 +61,7 @@ AC_HELP_STRING([--enable-gtk3],[enable to use gtk-3.0 instead of gtk-2.0]), + *) AC_MSG_ERROR([bad value "${enableval}" for --enable-gtk3, use "yes" (default) or "no".]) ;; + esac],[]) + +-PKG_CHECK_MODULES(OPENBOX, [obrender-3.0 >= 3.4.2 obparser-3.0 >= 3.4.2]) ++PKG_CHECK_MODULES(OPENBOX, [obrender-3.5 >= 3.5 obt-3.5 >= 3.5]) + AC_SUBST(OPENBOX_CFLAGS) + AC_SUBST(OPENBOX_LIBS) + +diff --git a/src/appearance.c b/src/appearance.c +index 1b26e66..2204007 100644 +--- a/src/appearance.c ++++ b/src/appearance.c +@@ -41,7 +41,8 @@ void on_font_active_font_set(GtkFontButton *w, gpointer data); + void on_font_inactive_font_set(GtkFontButton *w, gpointer data); + void on_font_menu_header_font_set(GtkFontButton *w, gpointer data); + void on_font_menu_item_font_set(GtkFontButton *w, gpointer data); +-void on_font_display_font_set(GtkFontButton *w, gpointer data); ++void on_font_active_display_font_set(GtkFontButton *w, gpointer data); ++void on_font_inactive_display_font_set(GtkFontButton *w, gpointer data); + + /* End of forwarded */ + +@@ -83,9 +84,13 @@ void appearance_setup_tab() + f = read_font(GTK_FONT_BUTTON(w), "MenuItem"); + preview_update_set_menu_item_font(f); + +- w = get_widget("font_display"); +- f = read_font(GTK_FONT_BUTTON(w), "OnScreenDisplay"); +- preview_update_set_osd_font(f); ++ w = get_widget("font_active_display"); ++ f = read_font(GTK_FONT_BUTTON(w), "OnScreenActiveDisplay"); ++ preview_update_set_active_osd_font(f); ++ ++ w = get_widget("font_incative_display"); ++ f = read_font(GTK_FONT_BUTTON(w), "OnScreenIactiveDisplay"); ++ preview_update_set_active_osd_font(f); + + mapping = FALSE; + } +@@ -184,11 +189,18 @@ void on_font_menu_item_font_set(GtkFontButton *w, gpointer data) + preview_update_set_menu_item_font(write_font(w, "MenuItem")); + } + +-void on_font_display_font_set(GtkFontButton *w, gpointer data) ++void on_font_active_display_font_set(GtkFontButton *w, gpointer data) ++{ ++ if (mapping) return; ++ ++ preview_update_set_active_osd_font(write_font(w, "OnScreenActiveDisplay")); ++} ++ ++void on_font_inactive_display_font_set(GtkFontButton *w, gpointer data) + { + if (mapping) return; + +- preview_update_set_osd_font(write_font(w, "OnScreenDisplay")); ++ preview_update_set_inactive_osd_font(write_font(w, "OnScreenInactiveDisplay")); + } + + static RrFont *read_font(GtkFontButton *w, const gchar *place) +diff --git a/src/main.c b/src/main.c +index a0e816c..78131c1 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -46,6 +46,8 @@ xmlDocPtr doc; + xmlNodePtr root; + RrInstance *rrinst; + gchar *obc_config_file = NULL; ++ObtPaths *paths; ++ObtXmlInst *xml_i; + + /* Disable, not used + static gchar *obc_theme_install = NULL; +@@ -181,7 +183,8 @@ extern gboolean plugin_load(LXAppearance* app, GtkBuilder* lxappearance_builder) + + g_signal_connect(app->dlg, "response", G_CALLBACK(on_response), app); + +- parse_paths_startup(); ++ paths = obt_paths_new(); ++ xml_i = obt_xml_instance_new(); + + if (!obc_config_file) { + gchar *p; +@@ -196,10 +199,19 @@ extern gboolean plugin_load(LXAppearance* app, GtkBuilder* lxappearance_builder) + } + + xmlIndentTreeOutput = 1; +- if (!parse_load_rc(obc_config_file, &doc, &root)) { ++ if (!obt_xml_load_config_file(xml_i, ++ "openbox", ++ (obc_config_file ? ++ obc_config_file : "rc.xml"), ++ "openbox_config")) ++ { + obconf_error(_("Failed to load an rc.xml. Openbox is probably not installed correctly."), TRUE); + exit_with_error = TRUE; + } ++ else { ++ doc = obt_xml_doc(xml_i); ++ root = obt_xml_root(xml_i); ++ } + + /* look for parsing errors */ + { +@@ -229,11 +241,13 @@ extern void plugin_unload(LXAppearance* app) + preview_update_set_inactive_font(NULL); + preview_update_set_menu_header_font(NULL); + preview_update_set_menu_item_font(NULL); +- preview_update_set_osd_font(NULL); ++ preview_update_set_active_osd_font(NULL); ++ preview_update_set_inactive_osd_font(NULL); + preview_update_set_title_layout(NULL); + + RrInstanceFree(rrinst); +- parse_paths_shutdown(); ++ obt_xml_instance_unref(xml_i); ++ obt_paths_unref(paths); + + xmlFreeDoc(doc); + } +diff --git a/src/main.h b/src/main.h +index 4ed0189..ad9ae52 100644 +--- a/src/main.h ++++ b/src/main.h +@@ -25,18 +25,19 @@ + #ifndef obconf__main_h + #define obconf__main_h + +-#include +-#include +-#include ++#include ++#include ++#include ++#include + + #include + + extern GtkBuilder *builder; +-extern xmlDocPtr doc; +-extern xmlNodePtr root; + extern RrInstance *rrinst; + extern GtkWidget *mainwin; + extern gchar *obc_config_file; ++extern ObtPaths *paths; ++extern ObtXmlInst *xml_i; + + #define get_widget(s) GTK_WIDGET(gtk_builder_get_object(builder, s)) + +diff --git a/src/obconf.glade b/src/obconf.glade +index 9a33804..e37d46d 100644 +--- a/src/obconf.glade ++++ b/src/obconf.glade +@@ -400,12 +400,19 @@ D: Omnipresent (On all desktops) + + + +- ++ + True + True + True + True +- ++ ++ ++ ++ True ++ True ++ True ++ True ++ + + + 5 +diff --git a/src/preview.c b/src/preview.c +index 42e038a..e9549d5 100644 +--- a/src/preview.c ++++ b/src/preview.c +@@ -23,7 +23,7 @@ + + #include + +-#include ++#include + + #if GTK_CHECK_VERSION(3, 0, 0) + #include +@@ -38,7 +38,8 @@ GdkPixbuf *preview_theme(const gchar *name, const gchar *titlelayout, + RrFont *inactive_window_font, + RrFont *menu_title_font, + RrFont *menu_item_font, +- RrFont *osd_font); ++ RrFont *active_osd_font, ++ RrFont *inactive_osd_font); + + /* End forwarded */ + +@@ -779,7 +780,8 @@ GdkPixbuf *preview_theme(const gchar *name, const gchar *titlelayout, + RrFont *inactive_window_font, + RrFont *menu_title_font, + RrFont *menu_item_font, +- RrFont *osd_font) ++ RrFont *active_osd_font, ++ RrFont *inactive_osd_font) + { + + GdkPixbuf *preview; +@@ -793,7 +795,8 @@ GdkPixbuf *preview_theme(const gchar *name, const gchar *titlelayout, + + RrTheme *theme = RrThemeNew(rrinst, name, FALSE, + active_window_font, inactive_window_font, +- menu_title_font, menu_item_font, osd_font); ++ menu_title_font, menu_item_font, ++ active_osd_font, inactive_osd_font); + if (!theme) + return NULL; + +diff --git a/src/preview.h b/src/preview.h +index 344d280..0d59205 100644 +--- a/src/preview.h ++++ b/src/preview.h +@@ -21,7 +21,7 @@ + + #include + +-#include ++#include + #include + + GdkPixbuf *preview_theme(const gchar *name, const gchar *titlelayout, +@@ -29,6 +29,7 @@ GdkPixbuf *preview_theme(const gchar *name, const gchar *titlelayout, + RrFont *inactive_window_font, + RrFont *menu_title_font, + RrFont *menu_item_font, +- RrFont *osd_font); ++ RrFont *active_osd_font, ++ RrFont *inactive_osd_font); + + #endif +diff --git a/src/preview_update.c b/src/preview_update.c +index e38b944..d446b8b 100644 +--- a/src/preview_update.c ++++ b/src/preview_update.c +@@ -38,15 +38,15 @@ static RrFont *active_window_font = NULL; + static RrFont *inactive_window_font = NULL; + static RrFont *menu_title_font = NULL; + static RrFont *menu_item_font = NULL; +-static RrFont *osd_font = NULL; +- ++static RrFont *active_osd_font = NULL; ++static RrFont *inactive_osd_font = NULL; + + void preview_update_all() + { + if (!list_store) return; + + if (!(title_layout && active_window_font && inactive_window_font && +- menu_title_font && menu_item_font && osd_font)) ++ menu_title_font && menu_item_font && active_osd_font && inactive_osd_font)) + return; /* not set up */ + + char* name; +@@ -57,7 +57,7 @@ void preview_update_all() + gtk_tree_model_get( GTK_TREE_MODEL(list_store), &it, 0, &name, -1); + GdkPixbuf* pix = preview_theme(name, title_layout, active_window_font, + inactive_window_font, menu_title_font, +- menu_item_font, osd_font); ++ menu_item_font, active_osd_font, inactive_osd_font); + GtkWidget* preview = get_widget("preview"); + gtk_image_set_from_pixbuf( GTK_IMAGE(preview), pix); + g_object_unref(pix); +@@ -104,10 +104,17 @@ void preview_update_set_menu_item_font(RrFont *f) + preview_update_all(); + } + +-void preview_update_set_osd_font(RrFont *f) ++void preview_update_set_active_osd_font(RrFont *f) ++{ ++ RrFontClose(active_osd_font); ++ active_osd_font = f; ++ preview_update_all(); ++} ++ ++void preview_update_set_inactive_osd_font(RrFont *f) + { +- RrFontClose(osd_font); +- osd_font = f; ++ RrFontClose(active_osd_font); ++ inactive_osd_font = f; + preview_update_all(); + } + +diff --git a/src/preview_update.h b/src/preview_update.h +index 1fe9674..4a3f95c 100644 +--- a/src/preview_update.h ++++ b/src/preview_update.h +@@ -1,7 +1,7 @@ + #ifndef obconf__preview_update_h + #define obconf__preview_update_h + +-#include ++#include + #include + + void preview_update_all(); +@@ -11,7 +11,8 @@ void preview_update_set_active_font (RrFont *f); + void preview_update_set_inactive_font (RrFont *f); + void preview_update_set_menu_header_font (RrFont *f); + void preview_update_set_menu_item_font (RrFont *f); +-void preview_update_set_osd_font (RrFont *f); ++void preview_update_set_active_osd_font (RrFont *f); ++void preview_update_set_inactive_osd_font (RrFont *f); + void preview_update_set_title_layout (const gchar *layout); + + #endif +diff --git a/src/theme.c b/src/theme.c +index 397b91f..d4c6c4a 100644 +--- a/src/theme.c ++++ b/src/theme.c +@@ -195,7 +195,7 @@ void theme_load_all() + + { + GSList *it; +- for (it = parse_xdg_data_dir_paths(); it; it = g_slist_next(it)) { ++ for (it = obt_paths_data_dirs(paths); it; it = g_slist_next(it)) { + p = g_build_filename(it->data, "themes", NULL); + add_theme_dir(p); + g_free(p); +diff --git a/src/tree.c b/src/tree.c +index 4fcf781..f6cd532 100644 +--- a/src/tree.c ++++ b/src/tree.c +@@ -25,7 +25,7 @@ + #include "tree.h" + #include "main.h" + +-#include ++#include + #include + #include + +@@ -35,7 +35,7 @@ xmlNodePtr tree_get_node(const gchar *path, const gchar *def) + gchar **nodes; + gchar **it, **next; + +- n = root; ++ n = obt_xml_root(xml_i); + + nodes = g_strsplit(path, "/", 0); + for (it = nodes; *it; it = next) { +@@ -46,19 +46,19 @@ xmlNodePtr tree_get_node(const gchar *path, const gchar *def) + next = it + 1; + + /* match attributes */ +- c = parse_find_node(attrs[0], n->children); ++ c = obt_xml_find_node(n->children, attrs[0]); + while (c && !ok) { + gint i; + + ok = TRUE; + for (i = 1; attrs[i]; ++i) { + gchar **eq = g_strsplit(attrs[i], "=", 2); +- if (eq[1] && !parse_attr_contains(eq[1], c, eq[0])) ++ if (eq[1] && !obt_xml_attr_contains(c, eq[0], eq[1])) + ok = FALSE; + g_strfreev(eq); + } + if (!ok) +- c = parse_find_node(attrs[0], c->next); ++ c = obt_xml_find_node(c->next, attrs[0]); + } + + if (!c) { +@@ -83,6 +83,17 @@ xmlNodePtr tree_get_node(const gchar *path, const gchar *def) + return n; + } + ++/* ++void tree_delete_node(const gchar *path) ++{ ++ xmlNodePtr n; ++ ++ n = tree_get_node(path, NULL); ++ xmlUnlinkNode(n); ++ xmlFreeNode(n); ++} ++*/ ++ + void tree_apply() + { + gchar *p, *d; +@@ -91,15 +102,14 @@ void tree_apply() + if (obc_config_file) + p = g_strdup(obc_config_file); + else +- p = g_build_filename(parse_xdg_config_home_path(), "openbox", ++ p = g_build_filename(obt_paths_config_home(paths), "openbox", + "rc.xml", NULL); + + d = g_path_get_dirname(p); +- parse_mkdir_path(d, 0700); ++ obt_paths_mkdir_path(d, 0700); + g_free(d); + +- err = xmlSaveFormatFile(p, doc, 1) == -1; +- if (err) { ++ if (!obt_xml_save_file(xml_i, p, TRUE)) { + gchar *s; + s = g_strdup_printf("An error occured while saving the " + "config file '%s'", p); +@@ -165,7 +175,7 @@ gchar* tree_get_string(const gchar *node, const gchar *def) + xmlNodePtr n; + + n = tree_get_node(node, def); +- return parse_string(doc, n); ++ return obt_xml_node_string(n); + } + + gint tree_get_int(const gchar *node, gint def) +@@ -176,7 +186,7 @@ gint tree_get_int(const gchar *node, gint def) + d = g_strdup_printf("%d", def); + n = tree_get_node(node, d); + g_free(d); +- return parse_int(doc, n); ++ return obt_xml_node_int(n); + } + + gboolean tree_get_bool(const gchar *node, gboolean def) +@@ -184,5 +194,5 @@ gboolean tree_get_bool(const gchar *node, gboolean def) + xmlNodePtr n; + + n = tree_get_node(node, (def ? "yes" : "no")); +- return parse_bool(doc, n); ++ return obt_xml_node_bool(n); + } +diff --git a/src/tree.h b/src/tree.h +index 39c96b3..986ac3a 100644 +--- a/src/tree.h ++++ b/src/tree.h +@@ -19,10 +19,12 @@ + #ifndef obconf__tree_h + #define obconf__tree_h + +-#include "openbox/parse.h" ++#include + + xmlNodePtr tree_get_node(const gchar *path, const gchar *def); + ++/* void tree_delete_node(const gchar *path) */ ++ + gchar* tree_get_string(const gchar *node, const gchar *def); + gint tree_get_int(const gchar *node, gint def); + gboolean tree_get_bool(const gchar *node, gboolean def); +-- +1.7.4.1 + diff -Nru lxappearance-obconf-0.0.1/debian/patches/02-openbox-3.5.patch lxappearance-obconf-0.0.1/debian/patches/02-openbox-3.5.patch --- lxappearance-obconf-0.0.1/debian/patches/02-openbox-3.5.patch 1970-01-01 00:00:00.000000000 +0000 +++ lxappearance-obconf-0.0.1/debian/patches/02-openbox-3.5.patch 2011-08-22 18:42:29.000000000 +0000 @@ -0,0 +1,35 @@ +From f47573dc99386e8790c0df86f072d323857fa422 Mon Sep 17 00:00:00 2001 +From: Andrea Florio +Date: Mon, 8 Aug 2011 15:46:26 +0200 +Subject: [PATCH] it should load the config file now + +--- + src/main.c | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/main.c b/src/main.c +index 78131c1..d2ece61 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -199,11 +199,16 @@ extern gboolean plugin_load(LXAppearance* app, GtkBuilder* lxappearance_builder) + } + + xmlIndentTreeOutput = 1; +- if (!obt_xml_load_config_file(xml_i, ++ ++ /* if (!obt_xml_load_config_file(xml_i, + "openbox", + (obc_config_file ? + obc_config_file : "rc.xml"), +- "openbox_config")) ++ "openbox_config")) */ ++ if(!obt_xml_load_config_file(xml_i, ++ "openbox", ++ "rc.xml", ++ "openbox_config")) + { + obconf_error(_("Failed to load an rc.xml. Openbox is probably not installed correctly."), TRUE); + exit_with_error = TRUE; +-- +1.7.4.1 + diff -Nru lxappearance-obconf-0.0.1/debian/patches/03-openbox-3.5.patch lxappearance-obconf-0.0.1/debian/patches/03-openbox-3.5.patch --- lxappearance-obconf-0.0.1/debian/patches/03-openbox-3.5.patch 1970-01-01 00:00:00.000000000 +0000 +++ lxappearance-obconf-0.0.1/debian/patches/03-openbox-3.5.patch 2011-08-22 18:43:14.000000000 +0000 @@ -0,0 +1,36 @@ +From 43b054e85b9935499010cfbb3fdfd0e5abc4776b Mon Sep 17 00:00:00 2001 +From: Andrea Florio +Date: Tue, 9 Aug 2011 17:33:01 +0200 +Subject: [PATCH] Load the rc.xml config file given on --config-file the same as Openbox (use the whole path given). + +--- + src/main.c | 13 +++---------- + 1 files changed, 3 insertions(+), 10 deletions(-) + +diff --git a/src/main.c b/src/main.c +index d2ece61..bc6a858 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -199,16 +199,9 @@ extern gboolean plugin_load(LXAppearance* app, GtkBuilder* lxappearance_builder) + } + + xmlIndentTreeOutput = 1; +- +- /* if (!obt_xml_load_config_file(xml_i, +- "openbox", +- (obc_config_file ? +- obc_config_file : "rc.xml"), +- "openbox_config")) */ +- if(!obt_xml_load_config_file(xml_i, +- "openbox", +- "rc.xml", +- "openbox_config")) ++if (!((obc_config_file && ++ obt_xml_load_file(xml_i, obc_config_file, "openbox_config")) || ++ obt_xml_load_config_file(parse_i, "openbox", "rc.xml", "openbox_config"))) + { + obconf_error(_("Failed to load an rc.xml. Openbox is probably not installed correctly."), TRUE); + exit_with_error = TRUE; +-- +1.7.4.1 + diff -Nru lxappearance-obconf-0.0.1/debian/patches/04-openbox-3.5.patch lxappearance-obconf-0.0.1/debian/patches/04-openbox-3.5.patch --- lxappearance-obconf-0.0.1/debian/patches/04-openbox-3.5.patch 1970-01-01 00:00:00.000000000 +0000 +++ lxappearance-obconf-0.0.1/debian/patches/04-openbox-3.5.patch 2011-08-22 18:43:41.000000000 +0000 @@ -0,0 +1,25 @@ +From 783e544c0c8f9ebc3c002f60decb6f538ba86531 Mon Sep 17 00:00:00 2001 +From: Andrea Florio +Date: Tue, 9 Aug 2011 17:36:17 +0200 +Subject: [PATCH] fixed trivial error + +--- + src/main.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/main.c b/src/main.c +index bc6a858..00525b4 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -201,7 +201,7 @@ extern gboolean plugin_load(LXAppearance* app, GtkBuilder* lxappearance_builder) + xmlIndentTreeOutput = 1; + if (!((obc_config_file && + obt_xml_load_file(xml_i, obc_config_file, "openbox_config")) || +- obt_xml_load_config_file(parse_i, "openbox", "rc.xml", "openbox_config"))) ++ obt_xml_load_config_file(xml_i, "openbox", "rc.xml", "openbox_config"))) + { + obconf_error(_("Failed to load an rc.xml. Openbox is probably not installed correctly."), TRUE); + exit_with_error = TRUE; +-- +1.7.4.1 + diff -Nru lxappearance-obconf-0.0.1/debian/patches/05-openbox-3.5.patch lxappearance-obconf-0.0.1/debian/patches/05-openbox-3.5.patch --- lxappearance-obconf-0.0.1/debian/patches/05-openbox-3.5.patch 1970-01-01 00:00:00.000000000 +0000 +++ lxappearance-obconf-0.0.1/debian/patches/05-openbox-3.5.patch 2011-08-22 18:44:07.000000000 +0000 @@ -0,0 +1,87 @@ +From 966cb46f0ad5420ee4dc44619012cc5301fb6051 Mon Sep 17 00:00:00 2001 +From: Andrea Florio +Date: Tue, 9 Aug 2011 19:04:43 +0200 +Subject: [PATCH] allign with obconf upstream code + +--- + src/preview_update.c | 23 +++++++++++++---------- + src/preview_update.h | 4 ++-- + 2 files changed, 15 insertions(+), 12 deletions(-) + +diff --git a/src/preview_update.c b/src/preview_update.c +index d446b8b..13963e7 100644 +--- a/src/preview_update.c ++++ b/src/preview_update.c +@@ -38,15 +38,17 @@ static RrFont *active_window_font = NULL; + static RrFont *inactive_window_font = NULL; + static RrFont *menu_title_font = NULL; + static RrFont *menu_item_font = NULL; +-static RrFont *active_osd_font = NULL; +-static RrFont *inactive_osd_font = NULL; ++static RrFont *osd_active_font = NULL; ++static RrFont *osd_inactive_font = NULL; + + void preview_update_all() + { + if (!list_store) return; ++ if (!RR_CHECK_VERSION(3,5,0)) return; + + if (!(title_layout && active_window_font && inactive_window_font && +- menu_title_font && menu_item_font && active_osd_font && inactive_osd_font)) ++ menu_title_font && menu_item_font && ++ osd_active_font && osd_inactive_font)) + return; /* not set up */ + + char* name; +@@ -57,7 +59,8 @@ void preview_update_all() + gtk_tree_model_get( GTK_TREE_MODEL(list_store), &it, 0, &name, -1); + GdkPixbuf* pix = preview_theme(name, title_layout, active_window_font, + inactive_window_font, menu_title_font, +- menu_item_font, active_osd_font, inactive_osd_font); ++ menu_item_font, osd_active_font, ++ osd_inactive_font); + GtkWidget* preview = get_widget("preview"); + gtk_image_set_from_pixbuf( GTK_IMAGE(preview), pix); + g_object_unref(pix); +@@ -104,17 +107,17 @@ void preview_update_set_menu_item_font(RrFont *f) + preview_update_all(); + } + +-void preview_update_set_active_osd_font(RrFont *f) ++void preview_update_set_osd_active_font(RrFont *f) + { +- RrFontClose(active_osd_font); +- active_osd_font = f; ++ RrFontClose(osd_active_font); ++ osd_active_font = f; + preview_update_all(); + } + +-void preview_update_set_inactive_osd_font(RrFont *f) ++void preview_update_set_osd_inactive_font(RrFont *f) + { +- RrFontClose(active_osd_font); +- inactive_osd_font = f; ++ RrFontClose(osd_inactive_font); ++ osd_inactive_font = f; + preview_update_all(); + } + +diff --git a/src/preview_update.h b/src/preview_update.h +index 4a3f95c..085ba37 100644 +--- a/src/preview_update.h ++++ b/src/preview_update.h +@@ -11,8 +11,8 @@ void preview_update_set_active_font (RrFont *f); + void preview_update_set_inactive_font (RrFont *f); + void preview_update_set_menu_header_font (RrFont *f); + void preview_update_set_menu_item_font (RrFont *f); +-void preview_update_set_active_osd_font (RrFont *f); +-void preview_update_set_inactive_osd_font (RrFont *f); ++void preview_update_set_osd_active_font (RrFont *f); ++void preview_update_set_osd_inactive_font (RrFont *f); + void preview_update_set_title_layout (const gchar *layout); + + #endif +-- +1.7.4.1 + diff -Nru lxappearance-obconf-0.0.1/debian/patches/06-openbox-3.5.patch lxappearance-obconf-0.0.1/debian/patches/06-openbox-3.5.patch --- lxappearance-obconf-0.0.1/debian/patches/06-openbox-3.5.patch 1970-01-01 00:00:00.000000000 +0000 +++ lxappearance-obconf-0.0.1/debian/patches/06-openbox-3.5.patch 2011-08-22 18:44:34.000000000 +0000 @@ -0,0 +1,114 @@ +From a2c6e857ffa240fae64c4c95d7beb92aa16234f4 Mon Sep 17 00:00:00 2001 +From: Guido Berhoerster +Date: Sun, 14 Aug 2011 17:21:06 +0200 +Subject: [PATCH] fix the incomplete rename started with 966cb46f0ad5420ee4dc44619012cc5301fb6051 + +--- + src/appearance.c | 8 ++++---- + src/main.c | 4 ++-- + src/preview.c | 10 +++++----- + src/preview.h | 4 ++-- + 4 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/src/appearance.c b/src/appearance.c +index 2204007..aa07755 100644 +--- a/src/appearance.c ++++ b/src/appearance.c +@@ -86,11 +86,11 @@ void appearance_setup_tab() + + w = get_widget("font_active_display"); + f = read_font(GTK_FONT_BUTTON(w), "OnScreenActiveDisplay"); +- preview_update_set_active_osd_font(f); ++ preview_update_set_osd_active_font(f); + + w = get_widget("font_incative_display"); + f = read_font(GTK_FONT_BUTTON(w), "OnScreenIactiveDisplay"); +- preview_update_set_active_osd_font(f); ++ preview_update_set_osd_active_font(f); + + mapping = FALSE; + } +@@ -193,14 +193,14 @@ void on_font_active_display_font_set(GtkFontButton *w, gpointer data) + { + if (mapping) return; + +- preview_update_set_active_osd_font(write_font(w, "OnScreenActiveDisplay")); ++ preview_update_set_osd_active_font(write_font(w, "OnScreenActiveDisplay")); + } + + void on_font_inactive_display_font_set(GtkFontButton *w, gpointer data) + { + if (mapping) return; + +- preview_update_set_inactive_osd_font(write_font(w, "OnScreenInactiveDisplay")); ++ preview_update_set_osd_inactive_font(write_font(w, "OnScreenInactiveDisplay")); + } + + static RrFont *read_font(GtkFontButton *w, const gchar *place) +diff --git a/src/main.c b/src/main.c +index 00525b4..262f9a8 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -239,8 +239,8 @@ extern void plugin_unload(LXAppearance* app) + preview_update_set_inactive_font(NULL); + preview_update_set_menu_header_font(NULL); + preview_update_set_menu_item_font(NULL); +- preview_update_set_active_osd_font(NULL); +- preview_update_set_inactive_osd_font(NULL); ++ preview_update_set_osd_active_font(NULL); ++ preview_update_set_osd_inactive_font(NULL); + preview_update_set_title_layout(NULL); + + RrInstanceFree(rrinst); +diff --git a/src/preview.c b/src/preview.c +index e9549d5..72e3cbf 100644 +--- a/src/preview.c ++++ b/src/preview.c +@@ -38,8 +38,8 @@ GdkPixbuf *preview_theme(const gchar *name, const gchar *titlelayout, + RrFont *inactive_window_font, + RrFont *menu_title_font, + RrFont *menu_item_font, +- RrFont *active_osd_font, +- RrFont *inactive_osd_font); ++ RrFont *osd_active_font, ++ RrFont *osd_inactive_font); + + /* End forwarded */ + +@@ -780,8 +780,8 @@ GdkPixbuf *preview_theme(const gchar *name, const gchar *titlelayout, + RrFont *inactive_window_font, + RrFont *menu_title_font, + RrFont *menu_item_font, +- RrFont *active_osd_font, +- RrFont *inactive_osd_font) ++ RrFont *osd_active_font, ++ RrFont *osd_inactive_font) + { + + GdkPixbuf *preview; +@@ -796,7 +796,7 @@ GdkPixbuf *preview_theme(const gchar *name, const gchar *titlelayout, + RrTheme *theme = RrThemeNew(rrinst, name, FALSE, + active_window_font, inactive_window_font, + menu_title_font, menu_item_font, +- active_osd_font, inactive_osd_font); ++ osd_active_font, osd_inactive_font); + if (!theme) + return NULL; + +diff --git a/src/preview.h b/src/preview.h +index 0d59205..801fc6f 100644 +--- a/src/preview.h ++++ b/src/preview.h +@@ -29,7 +29,7 @@ GdkPixbuf *preview_theme(const gchar *name, const gchar *titlelayout, + RrFont *inactive_window_font, + RrFont *menu_title_font, + RrFont *menu_item_font, +- RrFont *active_osd_font, +- RrFont *inactive_osd_font); ++ RrFont *osd_active_font, ++ RrFont *osd_inactive_font); + + #endif +-- +1.7.4.1 + diff -Nru lxappearance-obconf-0.0.1/debian/patches/07-openbox-3.5.patch lxappearance-obconf-0.0.1/debian/patches/07-openbox-3.5.patch --- lxappearance-obconf-0.0.1/debian/patches/07-openbox-3.5.patch 1970-01-01 00:00:00.000000000 +0000 +++ lxappearance-obconf-0.0.1/debian/patches/07-openbox-3.5.patch 2011-08-22 18:45:05.000000000 +0000 @@ -0,0 +1,57 @@ +From b56977a1fcbae6f7b354dbd8df0cc10a29af3191 Mon Sep 17 00:00:00 2001 +From: Guido Berhoerster +Date: Sun, 14 Aug 2011 17:20:28 +0200 +Subject: [PATCH] fix error handling when saving the config file in tree_apply() + +--- + src/tree.c | 19 ++++++++----------- + 1 files changed, 8 insertions(+), 11 deletions(-) + +diff --git a/src/tree.c b/src/tree.c +index f6cd532..071bf6a 100644 +--- a/src/tree.c ++++ b/src/tree.c +@@ -97,7 +97,6 @@ void tree_delete_node(const gchar *path) + void tree_apply() + { + gchar *p, *d; +- gboolean err; + + if (obc_config_file) + p = g_strdup(obc_config_file); +@@ -109,16 +108,7 @@ void tree_apply() + obt_paths_mkdir_path(d, 0700); + g_free(d); + +- if (!obt_xml_save_file(xml_i, p, TRUE)) { +- gchar *s; +- s = g_strdup_printf("An error occured while saving the " +- "config file '%s'", p); +- obconf_error(s, FALSE); +- g_free(s); +- } +- g_free(p); +- +- if (!err) { ++ if (obt_xml_save_file(xml_i, p, TRUE)) { + XEvent ce; + + ce.xclient.type = ClientMessage; +@@ -134,7 +124,14 @@ void tree_apply() + XSendEvent(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), GDK_ROOT_WINDOW(), FALSE, + SubstructureNotifyMask | SubstructureRedirectMask, + &ce); ++ } else { ++ gchar *s; ++ s = g_strdup_printf("An error occured while saving the " ++ "config file '%s'", p); ++ obconf_error(s, FALSE); ++ g_free(s); + } ++ g_free(p); + } + + void tree_set_string(const gchar *node, const gchar *value) +-- +1.7.4.1 + diff -Nru lxappearance-obconf-0.0.1/debian/patches/99-fix-translations.patch lxappearance-obconf-0.0.1/debian/patches/99-fix-translations.patch --- lxappearance-obconf-0.0.1/debian/patches/99-fix-translations.patch 1970-01-01 00:00:00.000000000 +0000 +++ lxappearance-obconf-0.0.1/debian/patches/99-fix-translations.patch 2011-08-22 20:52:18.000000000 +0000 @@ -0,0 +1,12 @@ +Index: lxappearance-obconf-0.0.1/po/POTFILES.skip +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ lxappearance-obconf-0.0.1/po/POTFILES.skip 2011-08-22 22:52:15.000000000 +0200 +@@ -0,0 +1,7 @@ ++.pc/01-openbox-3.5.patch/src/main.c ++.pc/01-openbox-3.5.patch/src/obconf.glade ++.pc/01-openbox-3.5.patch/src/theme.c ++.pc/02-openbox-3.5.patch/src/main.c ++.pc/03-openbox-3.5.patch/src/main.c ++.pc/04-openbox-3.5.patch/src/main.c ++.pc/06-openbox-3.5.patch/src/main.c diff -Nru lxappearance-obconf-0.0.1/debian/patches/series lxappearance-obconf-0.0.1/debian/patches/series --- lxappearance-obconf-0.0.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ lxappearance-obconf-0.0.1/debian/patches/series 2011-08-22 20:49:44.000000000 +0000 @@ -0,0 +1,8 @@ +01-openbox-3.5.patch +02-openbox-3.5.patch +03-openbox-3.5.patch +04-openbox-3.5.patch +05-openbox-3.5.patch +06-openbox-3.5.patch +07-openbox-3.5.patch +99-fix-translations.patch diff -Nru lxappearance-obconf-0.0.1/debian/rules lxappearance-obconf-0.0.1/debian/rules --- lxappearance-obconf-0.0.1/debian/rules 2011-07-24 12:24:03.000000000 +0000 +++ lxappearance-obconf-0.0.1/debian/rules 2011-08-22 19:39:57.000000000 +0000 @@ -15,7 +15,11 @@ CFLAGS+=-fPIC %: - dh $@ + dh --with autoreconf $@ + +override_dh_autoreconf: + mkdir m4/ + dh_autoreconf override_dh_install: #Remove .la and .a files. @@ -25,3 +29,7 @@ override_dh_strip: dh_strip --dbg-package=lxappearance-obconf-dbg + +override_dh_autoreconf_clean: + dh_autoreconf_clean + [ ! -d m4/ ] || rmdir --ignore-fail-on-non-empty m4/