diff options
Diffstat (limited to 'libre/lxappearance-obconf-gtk3')
3 files changed, 671 insertions, 0 deletions
diff --git a/libre/lxappearance-obconf-gtk3/PKGBUILD b/libre/lxappearance-obconf-gtk3/PKGBUILD new file mode 100644 index 000000000..3049f3976 --- /dev/null +++ b/libre/lxappearance-obconf-gtk3/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Balló György <ballogyor+arch at gmail dot com> +# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl> + +pkgname=lxappearance-obconf-gtk3 +_pkgname=lxappearance-obconf +pkgver=0.2.3 +pkgrel=3 +pkgrel=.parabola1 +pkgdesc='Plugin for LXAppearance to configure Openbox (GTK+ 3 version)' +arch=('i686' 'x86_64') +license=('GPL2') +url='https://lxde.org/' +groups=('lxde-gtk3') +depends=('lxappearance-gtk3' 'openbox' 'libobrender.so') +makedepends=('intltool') +conflicts=($_pkgname) +source=(https://downloads.sourceforge.net/lxde/$_pkgname-$pkgver.tar.xz + gtk3-theme-preview-hide.patch + gtk3-theme-preview-segfault.patch) +sha256sums=('3150b33b4b7beb71c1803aee2be21c94767d73b70dfc8d2bcaafe2650ea83149' + '05a6bbea29468f85ebb1ccf0952688ecff53ac6f7b5fad58ae25ce540d698cf2' + 'de9201ae495214d9f48669cadea043af6275484f341f01486c596e0cfcb90dd5') + +prepare() { + cd $_pkgname-$pkgver + + # Hide theme preview, as it's broken with GTK+ 3 + # - https://sourceforge.net/p/lxde/bugs/768/ + patch -Np1 < "${srcdir}"/gtk3-theme-preview-hide.patch + + # Avoid rendering theme preview - GTK3/cairo segfault + # - https://sourceforge.net/p/lxde/bugs/933/ + patch -Np1 < "${srcdir}"/gtk3-theme-preview-segfault.patch +} + +build() { + cd $_pkgname-$pkgver + ./configure --prefix=/usr --enable-gtk3 + + #https://bugzilla.gnome.org/show_bug.cgi?id=656231 + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + + make +} + +package() { + cd $_pkgname-$pkgver + make DESTDIR="$pkgdir" install +} diff --git a/libre/lxappearance-obconf-gtk3/gtk3-theme-preview-hide.patch b/libre/lxappearance-obconf-gtk3/gtk3-theme-preview-hide.patch new file mode 100644 index 000000000..358f725a1 --- /dev/null +++ b/libre/lxappearance-obconf-gtk3/gtk3-theme-preview-hide.patch @@ -0,0 +1,608 @@ +diff --git a/Makefile.am b/Makefile.am +index 22f7501..e2a86ba 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -58,6 +58,7 @@ src_obconf_la_SOURCES = \ + src/tree.h + + dist_glade_DATA = \ ++ src/obconf-gtk3.glade \ + src/obconf.glade + + EXTRA_DIST = \ +diff --git a/Makefile.in b/Makefile.in +index c308cc7..dd0a378 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -480,6 +480,7 @@ src_obconf_la_SOURCES = \ + src/tree.h + + dist_glade_DATA = \ ++ src/obconf-gtk3.glade \ + src/obconf.glade + + EXTRA_DIST = \ +diff --git a/src/main.c b/src/main.c +index a39faf1..15c65d8 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -171,12 +171,22 @@ extern gboolean plugin_load(LXAppearance* app, GtkBuilder* lxappearance_builder) + + builder = gtk_builder_new(); + gtk_builder_set_translation_domain(builder, GETTEXT_PACKAGE); ++#if GTK_CHECK_VERSION(3, 0, 0) ++ // hide theme preview for GTKv3 (ticket #768) ++ g_debug(GLADEDIR"/obconf-gtk3.glade"); ++ if(!gtk_builder_add_from_file(builder, GLADEDIR"/obconf-gtk3.glade", NULL)) ++ { ++ obconf_error(_("Failed to load the obconf-gtk3.glade interface file. ObConf is probably not installed correctly."), TRUE); ++ exit_with_error = TRUE; ++ } ++#elif // GTK_CHECK_VERSION(3, 0, 0) + g_debug(GLADEDIR"/obconf.glade"); + if(!gtk_builder_add_from_file(builder, GLADEDIR"/obconf.glade", NULL)) + { + obconf_error(_("Failed to load the obconf.glade interface file. ObConf is probably not installed correctly."), TRUE); + exit_with_error = TRUE; + } ++#endif // GTK_CHECK_VERSION(3, 0, 0) + gtk_builder_connect_signals(builder, NULL); + gtk_box_pack_start( GTK_BOX(app->wm_page), get_widget("obconf_vbox"), TRUE, TRUE, 0); + gtk_widget_show_all(app->wm_page); +diff --git a/src/obconf-gtk3.glade b/src/obconf-gtk3.glade +new file mode 100644 +index 0000000..eb738e4 +--- /dev/null ++++ b/src/obconf-gtk3.glade +@@ -0,0 +1,551 @@ ++<?xml version="1.0" encoding="UTF-8"?> ++<interface> ++ <requires lib="gtk+" version="2.16"/> ++ <!-- interface-naming-policy project-wide --> ++ <object class="GtkVBox" id="obconf_vbox"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="spacing">6</property> ++ <child> ++ <object class="GtkHBox" id="hbox1"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="spacing">12</property> ++ <child> ++ <object class="GtkNotebook" id="notebook1"> ++ <property name="visible">True</property> ++ <property name="can_focus">True</property> ++ <property name="scrollable">True</property> ++ <child> ++ <object class="GtkVBox" id="vbox1"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="border_width">12</property> ++ <property name="spacing">6</property> ++ <child> ++ <object class="GtkVBox" id="vbox3"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="spacing">6</property> ++ <child> ++ <object class="GtkLabel" id="label3"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="xalign">0</property> ++ <property name="label" translatable="yes"><span weight="bold">Theme</span></property> ++ <property name="use_markup">True</property> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">False</property> ++ <property name="position">0</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkScrolledWindow" id="scrolledwindow1"> ++ <property name="visible">True</property> ++ <property name="can_focus">True</property> ++ <property name="hscrollbar_policy">never</property> ++ <property name="vscrollbar_policy">automatic</property> ++ <property name="shadow_type">in</property> ++ <child> ++ <object class="GtkTreeView" id="theme_names"> ++ <property name="visible">True</property> ++ <property name="can_focus">True</property> ++ <property name="headers_visible">False</property> ++ </object> ++ </child> ++ </object> ++ <packing> ++ <property name="expand">True</property> ++ <property name="fill">True</property> ++ <property name="position">1</property> ++ </packing> ++ </child> ++ </object> ++ <packing> ++ <property name="expand">True</property> ++ <property name="fill">True</property> ++ <property name="position">0</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkVBox" id="vbox5"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <child> ++ <object class="GtkButton" id="install_theme"> ++ <property name="visible">True</property> ++ <property name="can_focus">True</property> ++ <property name="receives_default">True</property> ++ <property name="use_action_appearance">False</property> ++ <signal name="clicked" handler="on_install_theme_clicked" swapped="no"/> ++ <child> ++ <object class="GtkAlignment" id="alignment3"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="xalign">0</property> ++ <property name="xscale">0</property> ++ <property name="yscale">0</property> ++ <child> ++ <object class="GtkHBox" id="hbox3"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="spacing">2</property> ++ <child> ++ <object class="GtkImage" id="image3"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="stock">gtk-open</property> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">False</property> ++ <property name="position">0</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkLabel" id="label5"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="label" translatable="yes">_Install a new theme...</property> ++ <property name="use_underline">True</property> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">False</property> ++ <property name="position">1</property> ++ </packing> ++ </child> ++ </object> ++ </child> ++ </object> ++ </child> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">False</property> ++ <property name="position">0</property> ++ </packing> ++ </child> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">1</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkVBox" id="vbox6"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <child> ++ <object class="GtkButton" id="theme_archive"> ++ <property name="visible">True</property> ++ <property name="can_focus">True</property> ++ <property name="receives_default">True</property> ++ <property name="use_action_appearance">False</property> ++ <signal name="clicked" handler="on_theme_archive_clicked" swapped="no"/> ++ <child> ++ <object class="GtkAlignment" id="alignment4"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="xalign">0</property> ++ <property name="xscale">0</property> ++ <property name="yscale">0</property> ++ <child> ++ <object class="GtkHBox" id="hbox4"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="spacing">2</property> ++ <child> ++ <object class="GtkImage" id="image4"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="stock">gtk-save</property> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">False</property> ++ <property name="position">0</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkLabel" id="label6"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="label" translatable="yes">Create a theme _archive (.obt)...</property> ++ <property name="use_underline">True</property> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">False</property> ++ <property name="position">1</property> ++ </packing> ++ </child> ++ </object> ++ </child> ++ </object> ++ </child> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">False</property> ++ <property name="position">0</property> ++ </packing> ++ </child> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">2</property> ++ </packing> ++ </child> ++ </object> ++ </child> ++ <child type="tab"> ++ <object class="GtkLabel" id="label7"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="xalign">0</property> ++ <property name="label" translatable="yes">Theme</property> ++ </object> ++ <packing> ++ <property name="tab_fill">False</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkVBox" id="vbox7"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="border_width">12</property> ++ <property name="spacing">18</property> ++ <child> ++ <object class="GtkVBox" id="vbox8"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="spacing">6</property> ++ <child> ++ <object class="GtkLabel" id="label15"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="xalign">0</property> ++ <property name="label" translatable="yes">Font for active window title:</property> ++ <property name="use_underline">True</property> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">0</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkFontButton" id="font_active"> ++ <property name="visible">True</property> ++ <property name="can_focus">True</property> ++ <property name="receives_default">True</property> ++ <property name="use_action_appearance">False</property> ++ <property name="use_font">True</property> ++ <signal name="font-set" handler="on_font_active_font_set" swapped="no"/> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">1</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkLabel" id="label16"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="xalign">0</property> ++ <property name="label" translatable="yes">Font for inactive window title:</property> ++ <property name="use_underline">True</property> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">2</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkFontButton" id="font_inactive"> ++ <property name="visible">True</property> ++ <property name="can_focus">True</property> ++ <property name="receives_default">True</property> ++ <property name="use_action_appearance">False</property> ++ <property name="use_font">True</property> ++ <signal name="font-set" handler="on_font_inactive_font_set" swapped="no"/> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">3</property> ++ </packing> ++ </child> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">0</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkVBox" id="vbox11"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="spacing">6</property> ++ <child> ++ <object class="GtkHBox" id="hbox6"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="spacing">6</property> ++ <child> ++ <object class="GtkLabel" id="label10"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="label" translatable="yes">_Button order:</property> ++ <property name="use_underline">True</property> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">0</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkEntry" id="title_layout"> ++ <property name="visible">True</property> ++ <property name="can_focus">True</property> ++ <property name="invisible_char">●</property> ++ <property name="primary_icon_activatable">False</property> ++ <property name="secondary_icon_activatable">False</property> ++ <property name="primary_icon_sensitive">True</property> ++ <property name="secondary_icon_sensitive">True</property> ++ <signal name="changed" handler="on_title_layout_changed" swapped="no"/> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">1</property> ++ </packing> ++ </child> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">0</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkLabel" id="label11"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="xalign">0</property> ++ <property name="yalign">0</property> ++ <property name="label" translatable="yes">N: Window icon ++L: Window label (Title) ++I: Iconify (Minimize) ++M: Maximize ++C: Close ++S: Shade (Roll up) ++D: Omnipresent (On all desktops)</property> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">1</property> ++ </packing> ++ </child> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">1</property> ++ </packing> ++ </child> ++ </object> ++ <packing> ++ <property name="position">1</property> ++ </packing> ++ </child> ++ <child type="tab"> ++ <object class="GtkLabel" id="label12"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="xalign">0</property> ++ <property name="label" translatable="yes">Title Bar</property> ++ </object> ++ <packing> ++ <property name="position">1</property> ++ <property name="tab_fill">False</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkVBox" id="vbox10"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="border_width">12</property> ++ <child> ++ <object class="GtkVBox" id="vbox2"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="spacing">6</property> ++ <child> ++ <object class="GtkLabel" id="label17"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="xalign">0</property> ++ <property name="label" translatable="yes">Font for menu header:</property> ++ <property name="use_underline">True</property> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">0</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkFontButton" id="font_menu_header"> ++ <property name="visible">True</property> ++ <property name="can_focus">True</property> ++ <property name="receives_default">True</property> ++ <property name="use_action_appearance">False</property> ++ <property name="use_font">True</property> ++ <signal name="font-set" handler="on_font_menu_header_font_set" swapped="no"/> ++ </object> ++ <packing> ++ <property name="expand">True</property> ++ <property name="fill">True</property> ++ <property name="position">1</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkLabel" id="label18"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="xalign">0</property> ++ <property name="label" translatable="yes">Font for menu Item:</property> ++ <property name="use_underline">True</property> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">2</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkFontButton" id="font_menu_item"> ++ <property name="visible">True</property> ++ <property name="can_focus">True</property> ++ <property name="receives_default">True</property> ++ <property name="use_action_appearance">False</property> ++ <property name="use_font">True</property> ++ <signal name="font-set" handler="on_font_menu_item_font_set" swapped="no"/> ++ </object> ++ <packing> ++ <property name="expand">True</property> ++ <property name="fill">True</property> ++ <property name="position">3</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkLabel" id="label19"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="xalign">0</property> ++ <property name="label" translatable="yes">Font for on-screen display:</property> ++ <property name="use_underline">True</property> ++ </object> ++ <packing> ++ <property name="expand">True</property> ++ <property name="fill">True</property> ++ <property name="position">4</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkFontButton" id="font_active_display"> ++ <property name="visible">True</property> ++ <property name="can_focus">True</property> ++ <property name="receives_default">True</property> ++ <property name="use_action_appearance">False</property> ++ <property name="use_font">True</property> ++ <signal name="font-set" handler="on_font_active_display_font_set" swapped="no"/> ++ </object> ++ <packing> ++ <property name="expand">True</property> ++ <property name="fill">True</property> ++ <property name="position">5</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkLabel" id="label1"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="xalign">0</property> ++ <property name="label" translatable="yes">Font for inactive on-screen display:</property> ++ <property name="use_underline">True</property> ++ </object> ++ <packing> ++ <property name="expand">True</property> ++ <property name="fill">True</property> ++ <property name="position">6</property> ++ </packing> ++ </child> ++ <child> ++ <object class="GtkFontButton" id="font_inactive_display"> ++ <property name="visible">True</property> ++ <property name="can_focus">True</property> ++ <property name="receives_default">True</property> ++ <property name="use_action_appearance">False</property> ++ <property name="use_font">True</property> ++ <signal name="font-set" handler="on_font_inactive_display_font_set" swapped="no"/> ++ </object> ++ <packing> ++ <property name="expand">True</property> ++ <property name="fill">True</property> ++ <property name="position">7</property> ++ </packing> ++ </child> ++ </object> ++ <packing> ++ <property name="expand">False</property> ++ <property name="fill">True</property> ++ <property name="position">0</property> ++ </packing> ++ </child> ++ </object> ++ <packing> ++ <property name="position">2</property> ++ </packing> ++ </child> ++ <child type="tab"> ++ <object class="GtkLabel" id="label20"> ++ <property name="visible">True</property> ++ <property name="can_focus">False</property> ++ <property name="xalign">0</property> ++ <property name="label" translatable="yes">Misc.</property> ++ </object> ++ <packing> ++ <property name="position">2</property> ++ <property name="tab_fill">False</property> ++ </packing> ++ </child> ++ </object> ++ <packing> ++ <property name="expand">True</property> ++ <property name="fill">True</property> ++ <property name="position">0</property> ++ </packing> ++ </child> ++ <child> ++ </child> ++ </object> ++ <packing> ++ <property name="expand">True</property> ++ <property name="fill">True</property> ++ <property name="position">0</property> ++ </packing> ++ </child> ++ </object> ++</interface> diff --git a/libre/lxappearance-obconf-gtk3/gtk3-theme-preview-segfault.patch b/libre/lxappearance-obconf-gtk3/gtk3-theme-preview-segfault.patch new file mode 100644 index 000000000..1a7a53026 --- /dev/null +++ b/libre/lxappearance-obconf-gtk3/gtk3-theme-preview-segfault.patch @@ -0,0 +1,14 @@ +diff --git a/src/preview.c b/src/preview.c +index ada6eb3..eb51629 100644 +--- a/src/preview.c ++++ b/src/preview.c +@@ -815,6 +815,9 @@ GdkPixbuf *preview_theme(const gchar *name, const gchar *titlelayout, + RrFont *osd_active_font, + RrFont *osd_inactive_font) + { ++#if GTK_CHECK_VERSION(3, 0, 0) ++ return NULL; // avoid GTK3/cairo segfault (ticket #933) ++#endif + + GdkPixbuf *preview; + GdkPixbuf *menu; |