Skip to content
Snippets Groups Projects
Commit 8e0f5e6f authored by Balló György's avatar Balló György :flag_hu:
Browse files

Update to new version

parent 09e0cdee
No related branches found
Tags 5.16.5-1
No related merge requests found
From 8a9001bdf8a367968922ca8193af56f5e22ec885 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
Date: Wed, 17 Feb 2016 15:56:26 +0100
Subject: [PATCH] Better handling the background of logout dialog
---
lxsession-logout/lxsession-logout.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lxsession-logout/lxsession-logout.c b/lxsession-logout/lxsession-logout.c
index 8141b19..698b7d2 100644
--- a/lxsession-logout/lxsession-logout.c
+++ b/lxsession-logout/lxsession-logout.c
@@ -629,9 +629,7 @@ int main(int argc, char * argv[])
gtk_container_add(GTK_CONTAINER(alignment), center_area);
#ifdef USE_GTK3
- GtkStyle* style = gtk_widget_get_style (window);
- GdkColor color = style->bg[GTK_STATE_NORMAL];
- gtk_widget_modify_bg(center_area, GTK_STATE_NORMAL, &color);
+ gtk_style_context_add_class (gtk_widget_get_style_context (center_area), GTK_STYLE_CLASS_BACKGROUND);
#endif
GtkWidget* center_vbox = gtk_vbox_new(FALSE, 6);
--
2.7.1
From 33cd52312ef8a3abbb0709513f23b369941cb716 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
Date: Wed, 17 Feb 2016 15:48:04 +0100
Subject: [PATCH] Fix unique app handling
- Define variables explicitely for vala compiler.
- Use proper unique code for gtk3.
---
Makefile.am | 4 ++++
lxclipboard/main.vala | 11 +++++++++--
lxpolkit/main.vala | 11 +++++++++--
3 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index c9546f5..6d32d95 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -83,7 +83,9 @@ lxclipboard_lxclipboard_LDADD = \
$(NULL)
if USE_GTK3
+lxclipboard_lxclipboard_VALAFLAGS += --define USE_GTK3
else
+lxclipboard_lxclipboard_VALAFLAGS += --define USE_GTK2
lxclipboard_lxclipboard_VALAFLAGS += --pkg unique-1.0
lxclipboard_lxclipboard_CPPFLAGS += $(UNIQUE_CFLAGS)
lxclipboard_lxclipboard_LDADD += $(UNIQUE_LIBS)
@@ -128,7 +130,9 @@ lxpolkit_lxpolkit_LDADD = \
$(NULL)
if USE_GTK3
+lxpolkit_lxpolkit_VALAFLAGS += --define USE_GTK3
else
+lxpolkit_lxpolkit_VALAFLAGS += --define USE_GTK2
lxpolkit_lxpolkit_VALAFLAGS += --pkg unique-1.0
lxpolkit_lxpolkit_CPPFLAGS += $(UNIQUE_CFLAGS)
lxpolkit_lxpolkit_LDADD += $(UNIQUE_LIBS)
diff --git a/lxclipboard/main.vala b/lxclipboard/main.vala
index 059766b..7f0302e 100644
--- a/lxclipboard/main.vala
+++ b/lxclipboard/main.vala
@@ -37,8 +37,15 @@ namespace Lxsession
}
#endif
# if USE_GTK3
- Application app = new Application ();
- app.run (args);
+ Gtk.Application app = new Gtk.Application (
+ "org.lxde.lxclipboard",
+ GLib.ApplicationFlags.FLAGS_NONE);
+ app.register ();
+
+ if(app.is_remote)
+ {
+ return 0;
+ }
#endif
clipboard_start ();
diff --git a/lxpolkit/main.vala b/lxpolkit/main.vala
index 8828e3a..56be273 100644
--- a/lxpolkit/main.vala
+++ b/lxpolkit/main.vala
@@ -42,8 +42,15 @@ namespace Lxsession
}
#endif
# if USE_GTK3
- Application app = new Application ();
- app.run (args);
+ Gtk.Application app = new Gtk.Application (
+ "org.lxde.lxpolkit",
+ GLib.ApplicationFlags.FLAGS_NONE);
+ app.register ();
+
+ if(app.is_remote)
+ {
+ return 0;
+ }
#endif
policykit_agent_init();
--
2.7.1
From a7d3b40a79a7a16c1f5d50d2bd466570258dae29 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
Date: Sun, 22 Jan 2017 01:09:59 +0100
Subject: [PATCH] Use GApplication for unique app handling
Remove libunique dependency, and use glib >= 2.28.0 to handle unique apps both for GTK+ 2 and 3.
---
Makefile.am | 6 ------
configure.ac | 7 +------
lxclipboard/main.vala | 16 +---------------
lxpolkit/main.vala | 16 +---------------
4 files changed, 3 insertions(+), 42 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index c2e1fe8..e3a3b97 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -90,9 +90,6 @@ if USE_GTK3
lxclipboard_lxclipboard_VALAFLAGS += --define USE_GTK3
else
lxclipboard_lxclipboard_VALAFLAGS += --define USE_GTK2
-lxclipboard_lxclipboard_VALAFLAGS += --pkg unique-1.0
-lxclipboard_lxclipboard_CPPFLAGS += $(UNIQUE_CFLAGS)
-lxclipboard_lxclipboard_LDADD += $(UNIQUE_LIBS)
endif
lxpolkit_lxpolkit_vala_SOURCES = \
@@ -137,9 +134,6 @@ if USE_GTK3
lxpolkit_lxpolkit_VALAFLAGS += --define USE_GTK3
else
lxpolkit_lxpolkit_VALAFLAGS += --define USE_GTK2
-lxpolkit_lxpolkit_VALAFLAGS += --pkg unique-1.0
-lxpolkit_lxpolkit_CPPFLAGS += $(UNIQUE_CFLAGS)
-lxpolkit_lxpolkit_LDADD += $(UNIQUE_LIBS)
endif
lxsession_db_lxsession_db_SOURCES = \
diff --git a/configure.ac b/configure.ac
index 06ddbb3..9126f4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,7 +45,7 @@ PKG_CHECK_MODULES(X11, [x11])
AC_SUBST(X11_CFLAGS)
AC_SUBST(X11_LIBS)
-PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.6.0])
+PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.28.0])
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
@@ -79,11 +79,6 @@ else
CFLAGS="$CFLAGS -D USE_GTK2"
gtk_modules="gtk+-2.0 >= 2.6.0"
VALA_GTK_LIBS="gtk+-2.0"
-
- PKG_CHECK_MODULES(UNIQUE, [unique-1.0])
- AC_SUBST(UNIQUE_CFLAGS)
- AC_SUBST(UNIQUE_LIBS)
-
fi
PKG_CHECK_MODULES(GTK, [$gtk_modules])
AC_SUBST(GTK_CFLAGS)
diff --git a/lxclipboard/main.vala b/lxclipboard/main.vala
index bee4044..3d4a8d7 100644
--- a/lxclipboard/main.vala
+++ b/lxclipboard/main.vala
@@ -17,9 +17,6 @@
* MA 02110-1301, USA.
*/
using Gtk;
-#if USE_GTK2
-using Unique;
-#endif
namespace Lxsession
{
@@ -28,17 +25,7 @@ namespace Lxsession
public static int main(string[] args)
{
Gtk.init (ref args);
-#if USE_GTK2
- Unique.App app = new Unique.App("org.lxde.lxclipboard", null);
-
- if(app.is_running)
- {
- message("lxclipboard is already running. Existing");
- return 0;
- }
-#endif
-# if USE_GTK3
- Gtk.Application app = new Gtk.Application (
+ GLib.Application app = new GLib.Application (
"org.lxde.lxclipboard",
GLib.ApplicationFlags.FLAGS_NONE);
app.register ();
@@ -48,7 +35,6 @@ namespace Lxsession
message("lxclipboard is already running. Existing");
return 0;
}
-#endif
clipboard_start ();
diff --git a/lxpolkit/main.vala b/lxpolkit/main.vala
index c0d6ae2..50c3cb7 100644
--- a/lxpolkit/main.vala
+++ b/lxpolkit/main.vala
@@ -17,9 +17,6 @@
* MA 02110-1301, USA.
*/
using Gtk;
-#if USE_GTK2
-using Unique;
-#endif
const string GETTEXT_PACKAGE = "lxsession";
@@ -33,17 +30,7 @@ namespace Lxsession
Intl.bind_textdomain_codeset(GETTEXT_PACKAGE, "utf-8");
Gtk.init (ref args);
-#if USE_GTK2
- Unique.App app = new Unique.App("org.lxde.lxpolkit", null);
-
- if(app.is_running)
- {
- message(_("lxpolkit is already running. Existing"));
- return 0;
- }
-#endif
-# if USE_GTK3
- Gtk.Application app = new Gtk.Application (
+ GLib.Application app = new GLib.Application (
"org.lxde.lxpolkit",
GLib.ApplicationFlags.FLAGS_NONE);
app.register ();
@@ -53,7 +40,6 @@ namespace Lxsession
message(_("lxpolkit is already running. Existing"));
return 0;
}
-#endif
policykit_agent_init();
--
2.11.0
......@@ -5,30 +5,27 @@
pkgbase=lxsession
pkgname=(lxsession lxsession-gtk3)
pkgver=0.5.2
pkgrel=2
pkgver=0.5.3
pkgrel=1
epoch=1
pkgdesc='Lightweight X11 session manager'
arch=('i686' 'x86_64')
url="http://lxde.org/"
license=('GPL2')
depends=('dbus-glib' 'libunique' 'gtk3' 'polkit')
depends=('gtk2' 'gtk3' 'polkit')
makedepends=('intltool' 'docbook-xsl' 'vala')
conflicts=('lxpolkit')
source=(https://downloads.sourceforge.net/lxde/$pkgbase-$pkgver.tar.xz
gtk3.patch
0001-Better-handling-the-background-of-logout-dialog.patch
0001-Fix-unique-app-handling.patch)
md5sums=('2957acccbf9ce37ef8205ec5424f8047'
'ebbddffa32a54724dea65ce07696e396'
'6d1c77fd1904823a1ca3f0f9b5695107'
'96e959763db6353a7036d7338e57b977')
0001-Use-GApplication-for-unique-app-handling.patch)
sha256sums=('90bf42a45421f45f2c745d60f2c730176e1472642451c06c2ab07dcebdaf1fa8'
'8017e586a6e43939cfef2053edd81d4a0171f4105af59316bc42bda96506d323')
prepare() {
cd $pkgbase-$pkgver
patch -Np1 -i ../gtk3.patch
patch -Np1 -i ../0001-Better-handling-the-background-of-logout-dialog.patch
patch -Np1 -i ../0001-Fix-unique-app-handling.patch
# Use GApplication for unique app handling
# https://sourceforge.net/p/lxde/patches/539/
patch -Np1 -i ../0001-Use-GApplication-for-unique-app-handling.patch
# Regenerate C sources from Vala code
rm *.stamp
......@@ -39,20 +36,20 @@ build() {
# GTK+ 2 version
[ -d gtk2 ] || cp -r $pkgbase-$pkgver gtk2
cd gtk2
./configure --sysconfdir=/etc --prefix=/usr
./configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib
make
cd "$srcdir"
# GTK+ 3 version
[ -d gtk3 ] || cp -r $pkgbase-$pkgver gtk3
cd gtk3
./configure --sysconfdir=/etc --prefix=/usr --enable-gtk3
./configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --enable-gtk3
make
}
package_lxsession() {
groups=('lxde')
depends=('dbus-glib' 'libunique' 'polkit')
depends=('gtk2' 'polkit')
replaces=('lxpolkit')
cd gtk2
......@@ -62,7 +59,7 @@ package_lxsession() {
package_lxsession-gtk3() {
groups=('lxde-gtk3')
pkgdesc+=' (GTK+ 3 version)'
depends=('dbus-glib' 'gtk3' 'polkit')
depends=('gtk3' 'polkit')
conflicts+=('lxsession')
cd gtk3
......
From d01e3742e92b25c268084243584004851cc9be0e Mon Sep 17 00:00:00 2001
From: =?utf8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
Date: Thu, 18 Dec 2014 21:32:39 +0100
Subject: [PATCH] Beautify GtkBuilder UI file of lxpolkit without modification
This makes it easier to track changes in the future.
---
data/ui/lxpolkit.ui | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 182 insertions(+), 1 deletion(-)
diff --git a/data/ui/lxpolkit.ui b/data/ui/lxpolkit.ui
index e0940a2..2859db0 100644
--- a/data/ui/lxpolkit.ui
+++ b/data/ui/lxpolkit.ui
@@ -1 +1,182 @@
-<?xml version="1.0"?><interface><requires lib="gtk+" version="2.16"/><object class="GtkDialog" id="dlg"><property name="border_width">5</property><property name="title" translatable="yes">Authentication</property><property name="resizable">False</property><property name="window_position">center</property><property name="type_hint">normal</property><property name="has_separator">False</property><child internal-child="vbox"><object class="GtkVBox" id="dialog-vbox1"><property name="visible">True</property><property name="orientation">vertical</property><property name="spacing">2</property><child><object class="GtkVBox" id="vbox1"><property name="visible">True</property><property name="border_width">12</property><property name="orientation">vertical</property><property name="spacing">6</property><child><object class="GtkHBox" id="hbox1"><property name="visible">True</property><child><object class="GtkImage" id="icon"><property name="visible">True</property><property name="stock">gtk-missing-image</property></object><packing><property name="expand">False</property><property name="position">0</property></packing></child><child><object class="GtkLabel" id="msg"><property name="visible">True</property><property name="xalign">0</property><property name="yalign">0</property><property name="wrap">True</property></object><packing><property name="position">1</property></packing></child></object><packing><property name="expand">False</property><property name="position">0</property></packing></child><child><object class="GtkHBox" id="id_hbox"><property name="visible">True</property><property name="spacing">6</property><child><object class="GtkLabel" id="label1"><property name="visible">True</property><property name="label" translatable="yes">Identity:</property></object><packing><property name="expand">False</property><property name="position">0</property></packing></child><child><object class="GtkComboBox" id="id"><property name="visible">True</property><child><object class="GtkCellRendererText" id="rendertext"/><attributes><attribute name="text">0</attribute></attributes></child></object><packing><property name="position">1</property></packing></child></object><packing><property name="expand">False</property><property name="position">1</property></packing></child><child><object class="GtkHBox" id="hbox2"><property name="visible">True</property><child><object class="GtkLabel" id="request_label"><property name="visible">True</property></object><packing><property name="expand">False</property><property name="position">0</property></packing></child><child><object class="GtkEntry" id="request"><property name="visible">True</property><property name="can_focus">True</property><property name="has_focus">True</property><property name="visibility">False</property><property name="invisible_char">&#x2022;</property><property name="activates_default">True</property></object><packing><property name="position">1</property></packing></child></object><packing><property name="expand">False</property><property name="position">2</property></packing></child><child><object class="GtkLabel" id="detail"><property name="visible">True</property><property name="xalign">0</property><property name="yalign">0</property></object><packing><property name="expand">False</property><property name="position">3</property></packing></child></object><packing><property name="expand">False</property><property name="position">1</property></packing></child><child internal-child="action_area"><object class="GtkHButtonBox" id="dialog-action_area1"><property name="visible">True</property><property name="layout_style">end</property><child><object class="GtkButton" id="cancel"><property name="label">gtk-cancel</property><property name="visible">True</property><property name="can_focus">True</property><property name="receives_default">True</property><property name="use_stock">True</property></object><packing><property name="expand">False</property><property name="fill">False</property><property name="position">0</property></packing></child><child><object class="GtkButton" id="ok"><property name="label">gtk-ok</property><property name="visible">True</property><property name="can_focus">True</property><property name="can_default">True</property><property name="has_default">True</property><property name="receives_default">True</property><property name="use_stock">True</property></object><packing><property name="expand">False</property><property name="fill">False</property><property name="position">1</property></packing></child></object><packing><property name="expand">False</property><property name="pack_type">end</property><property name="position">0</property></packing></child></object></child><action-widgets><action-widget response="-6">cancel</action-widget><action-widget response="-5">ok</action-widget></action-widgets></object></interface>
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.16" />
+ <object class="GtkDialog" id="dlg">
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Authentication</property>
+ <property name="resizable">False</property>
+ <property name="window_position">center</property>
+ <property name="type_hint">normal</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="border_width">12</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkImage" id="icon">
+ <property name="visible">True</property>
+ <property name="stock">gtk-missing-image</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="msg">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="id_hbox">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Identity:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="id">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkCellRendererText" id="rendertext" />
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="request_label">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="request">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_focus">True</property>
+ <property name="visibility">False</property>
+ <property name="invisible_char">•</property>
+ <property name="activates_default">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="detail">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">cancel</action-widget>
+ <action-widget response="-5">ok</action-widget>
+ </action-widgets>
+ </object>
+</interface>
--
2.1.4
From f28fd2e9309bcc5053430ebfc01a9e130c66b816 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
Date: Thu, 18 Dec 2014 21:33:50 +0100
Subject: [PATCH] Some fixes for GTK+ 3
This makes lxpolkit and lxsession-edit compatible with GTK+ 3.
---
data/ui/lxpolkit.ui | 1 -
data/ui/lxsession-edit.ui | 1 -
2 files changed, 2 deletions(-)
diff --git a/data/ui/lxpolkit.ui b/data/ui/lxpolkit.ui
index 2859db0..c5b157c 100644
--- a/data/ui/lxpolkit.ui
+++ b/data/ui/lxpolkit.ui
@@ -7,7 +7,6 @@
<property name="resizable">False</property>
<property name="window_position">center</property>
<property name="type_hint">normal</property>
- <property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
diff --git a/data/ui/lxsession-edit.ui b/data/ui/lxsession-edit.ui
index 4d382aa..90cdada 100644
--- a/data/ui/lxsession-edit.ui
+++ b/data/ui/lxsession-edit.ui
@@ -10,7 +10,6 @@
<property name="default_width">512</property>
<property name="default_height">420</property>
<property name="type_hint">dialog</property>
- <property name="has_separator">True</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox">
<property name="visible">True</property>
--
2.1.4
From 21fa7f186771b7aa586a8cb05d0622dbee6a7c91 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
Date: Thu, 23 Jul 2015 10:31:26 +0200
Subject: [PATCH] Fix background on GTK+ 3
expose_event is not available in GTK+ 3, use draw signal to modify background. Also set a background for the center_area.
---
lxsession-logout/lxsession-logout.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/lxsession-logout/lxsession-logout.c b/lxsession-logout/lxsession-logout.c
index 3ad757f..cc7c7e3 100644
--- a/lxsession-logout/lxsession-logout.c
+++ b/lxsession-logout/lxsession-logout.c
@@ -94,7 +94,11 @@ static void switch_user_clicked(GtkButton * button, HandlerContext * handler_con
static void cancel_clicked(GtkButton * button, gpointer user_data);
static GtkPositionType get_banner_position(void);
static GdkPixbuf * get_background_pixbuf(void);
+#ifdef USE_GTK3
+gboolean draw(GtkWidget * widget, cairo_t * cr, GdkPixbuf * pixbuf);
+#else
gboolean expose_event(GtkWidget * widget, GdkEventExpose * event, GdkPixbuf * pixbuf);
+#endif
/* Try to run lxlock command in order to lock the screen, return TRUE on
* success, FALSE if command execution failed
@@ -419,13 +423,18 @@ static GdkPixbuf * get_background_pixbuf(void)
}
/* Handler for "expose_event" on background. */
+#ifdef USE_GTK3
+gboolean draw(GtkWidget * widget, cairo_t * cr, GdkPixbuf * pixbuf)
+#else
gboolean expose_event(GtkWidget * widget, GdkEventExpose * event, GdkPixbuf * pixbuf)
+#endif
{
if (pixbuf != NULL)
{
/* Copy the appropriate rectangle of the root window pixmap to the drawing area.
* All drawing areas are immediate children of the toplevel window, so the allocation yields the source coordinates directly. */
-#if GTK_CHECK_VERSION(2,14,0)
+#ifdef USE_GTK3
+#elif GTK_CHECK_VERSION(2,14,0)
cairo_t * cr = gdk_cairo_create (gtk_widget_get_window(widget));
#else
cairo_t * cr = gdk_cairo_create (widget->window);
@@ -437,7 +446,9 @@ gboolean expose_event(GtkWidget * widget, GdkEventExpose * event, GdkPixbuf * pi
0);
cairo_paint (cr);
+#ifndef USE_GTK3
cairo_destroy(cr);
+#endif
}
return FALSE;
}
@@ -600,7 +611,11 @@ int main(int argc, char * argv[])
GdkScreen* screen = gtk_widget_get_screen(window);
gtk_window_set_default_size(GTK_WINDOW(window), gdk_screen_get_width(screen), gdk_screen_get_height(screen));
gtk_widget_set_app_paintable(window, TRUE);
+#ifdef USE_GTK3
+ g_signal_connect(G_OBJECT(window), "draw", G_CALLBACK(draw), pixbuf);
+#else
g_signal_connect(G_OBJECT(window), "expose_event", G_CALLBACK(expose_event), pixbuf);
+#endif
g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(gtk_main_quit), NULL);
/* Toplevel container */
@@ -610,6 +625,12 @@ int main(int argc, char * argv[])
GtkWidget* center_area = gtk_event_box_new();
gtk_container_add(GTK_CONTAINER(alignment), center_area);
+#ifdef USE_GTK3
+ GtkStyle* style = gtk_widget_get_style (window);
+ GdkColor color = style->bg[GTK_STATE_NORMAL];
+ gtk_widget_modify_bg(center_area, GTK_STATE_NORMAL, &color);
+#endif
+
GtkWidget* center_vbox = gtk_vbox_new(FALSE, 6);
gtk_container_set_border_width(GTK_CONTAINER(center_vbox), 12);
gtk_container_add(GTK_CONTAINER(center_area), center_vbox);
--
2.1.4
From 0951a91a74f924f5537737a59cfa79505de3521d Mon Sep 17 00:00:00 2001
From: =?utf8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
Date: Fri, 31 Jul 2015 20:54:53 +0200
Subject: [PATCH] Add support for recent GDM versions.
Recently its pid file is located at /var/run/gdm/gdm.pid
---
lxsession-logout/lxsession-logout.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lxsession-logout/lxsession-logout.c b/lxsession-logout/lxsession-logout.c
index cc7c7e3..8141b19 100644
--- a/lxsession-logout/lxsession-logout.c
+++ b/lxsession-logout/lxsession-logout.c
@@ -144,6 +144,9 @@ static gboolean verify_running(const char * display_manager, const char * execut
char buffer[PATH_MAX];
sprintf(buffer, "/var/run/%s.pid", display_manager);
+ if (!g_file_test (buffer, G_FILE_TEST_IS_REGULAR))
+ sprintf(buffer, "/var/run/%s/%s.pid", display_manager, display_manager);
+
/* Open the pid file. */
int fd = open(buffer, O_RDONLY);
if (fd >= 0)
--
2.1.4
From 44f11c8ef2d84e7e031d996086686bee9b9e15c2 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
Date: Sun, 2 Aug 2015 00:56:22 +0200
Subject: [PATCH] Add OnlyShowIn LXDE to desktop entries
And MATE to NotShowIn in lxpolkit desktop entry,
---
data/lxpolkit.desktop.in.in | 2 +-
data/lxsession-default-apps.desktop.in | 2 +-
data/lxsession-edit.desktop.in | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/data/lxpolkit.desktop.in.in b/data/lxpolkit.desktop.in.in
index b86b1df..f717f0f 100644
--- a/data/lxpolkit.desktop.in.in
+++ b/data/lxpolkit.desktop.in.in
@@ -5,5 +5,5 @@ _Comment=Policykit Authentication Agent
Exec=lxpolkit
TryExec=lxpolkit
Icon=gtk-dialog-authentication
-NotShowIn=GNOME;KDE;
+NotShowIn=GNOME;KDE;MATE;
Hidden=true
diff --git a/data/lxsession-default-apps.desktop.in b/data/lxsession-default-apps.desktop.in
index d383f29..df3f453 100644
--- a/data/lxsession-default-apps.desktop.in
+++ b/data/lxsession-default-apps.desktop.in
@@ -5,4 +5,4 @@ Exec=lxsession-default-apps
_Name=Default applications for LXSession
_Comment=Change the default applications on LXDE
Categories=GTK;Settings;DesktopSettings;X-LXDE-Settings;
-NotShowIn=GNOME;KDE;XFCE;
+OnlyShowIn=LXDE;
diff --git a/data/lxsession-edit.desktop.in b/data/lxsession-edit.desktop.in
index 240d3a3..f826044 100644
--- a/data/lxsession-edit.desktop.in
+++ b/data/lxsession-edit.desktop.in
@@ -5,4 +5,4 @@ Exec=lxsession-edit
_Name=Desktop Session Settings
_Comment=Manage applications loaded in desktop session
Categories=GTK;Settings;DesktopSettings;X-LXDE-Settings;
-NotShowIn=GNOME;KDE;XFCE;
+OnlyShowIn=LXDE;
--
2.1.4
From 743d933df2146105b0fd8c5651612065432dffba Mon Sep 17 00:00:00 2001
From: =?utf8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
Date: Sun, 2 Aug 2015 02:35:03 +0200
Subject: [PATCH] Use standard icons
---
data/lxsession-default-apps.desktop.in | 2 +-
data/lxsession-edit.desktop.in | 2 +-
lxsession-default-apps/combobox.vala | 8 ++++----
lxsession-default-apps/main.vala | 10 +++++++++-
lxsession-edit/lxsession-edit.c | 2 +-
5 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/data/lxsession-default-apps.desktop.in b/data/lxsession-default-apps.desktop.in
index df3f453..9fb9643 100644
--- a/data/lxsession-default-apps.desktop.in
+++ b/data/lxsession-default-apps.desktop.in
@@ -1,6 +1,6 @@
[Desktop Entry]
Type=Application
-Icon=xfwm4
+Icon=preferences-desktop
Exec=lxsession-default-apps
_Name=Default applications for LXSession
_Comment=Change the default applications on LXDE
diff --git a/data/lxsession-edit.desktop.in b/data/lxsession-edit.desktop.in
index f826044..ddf87a5 100644
--- a/data/lxsession-edit.desktop.in
+++ b/data/lxsession-edit.desktop.in
@@ -1,6 +1,6 @@
[Desktop Entry]
Type=Application
-Icon=xfwm4
+Icon=preferences-desktop
Exec=lxsession-edit
_Name=Desktop Session Settings
_Comment=Manage applications loaded in desktop session
diff --git a/lxsession-default-apps/combobox.vala b/lxsession-default-apps/combobox.vala
index fa4f631..cd07954 100644
--- a/lxsession-default-apps/combobox.vala
+++ b/lxsession-default-apps/combobox.vala
@@ -83,7 +83,7 @@ namespace LDefaultApps
help_window.set_skip_taskbar_hint(true);
try
{
- help_window.icon = IconTheme.get_default ().load_icon ("xfwm4", 48, 0);
+ help_window.icon = IconTheme.get_default ().load_icon ("preferences-desktop", 48, 0);
}
catch (Error e)
{
@@ -113,7 +113,7 @@ namespace LDefaultApps
window.set_default_size (300, 500);
try
{
- window.icon = IconTheme.get_default ().load_icon ("xfwm4", 48, 0);
+ window.icon = IconTheme.get_default ().load_icon ("preferences-desktop", 48, 0);
}
catch (Error e)
{
@@ -422,7 +422,7 @@ namespace LDefaultApps
/* First row, empty for not selected and for unselect */
list_store.append (out iter);
- list_store.set (iter, 0, "gtk-close" , 1, _("Disable"), 2, 0, 3,"");
+ list_store.set (iter, 0, "window-close" , 1, _("Disable"), 2, 0, 3,"");
for (int a = 0 ; a < combobox_list.length ; a++)
{
@@ -542,7 +542,7 @@ namespace LDefaultApps
window_mime.set_skip_taskbar_hint(true);
try
{
- window_mime.icon = IconTheme.get_default ().load_icon ("xfwm4", 48, 0);
+ window_mime.icon = IconTheme.get_default ().load_icon ("preferences-desktop", 48, 0);
}
catch (Error e)
{
diff --git a/lxsession-default-apps/main.vala b/lxsession-default-apps/main.vala
index 859e219..3b27b18 100644
--- a/lxsession-default-apps/main.vala
+++ b/lxsession-default-apps/main.vala
@@ -32,7 +32,7 @@ namespace LDefaultApps
this.window_position = Gtk.WindowPosition.CENTER;
try
{
- this.icon = IconTheme.get_default ().load_icon ("xfwm4", 48, 0);
+ this.icon = IconTheme.get_default ().load_icon ("preferences-desktop", 48, 0);
}
catch (Error e)
{
@@ -97,6 +97,14 @@ namespace LDefaultApps
{
this.title = _("LXSession configuration");
this.window_position = Gtk.WindowPosition.CENTER;
+ try
+ {
+ this.icon = IconTheme.get_default ().load_icon ("preferences-desktop", 48, 0);
+ }
+ catch (Error e)
+ {
+ message ("Could not load application icon: %s\n", e.message);
+ }
this.set_default_size (600, 400);
this.destroy.connect (Gtk.main_quit);
diff --git a/lxsession-edit/lxsession-edit.c b/lxsession-edit/lxsession-edit.c
index 88fe9d1..af63edb 100644
--- a/lxsession-edit/lxsession-edit.c
+++ b/lxsession-edit/lxsession-edit.c
@@ -75,7 +75,7 @@ int main(int argc, char** argv)
gtk_dialog_set_alternative_button_order((GtkDialog*)dlg, GTK_RESPONSE_OK, GTK_RESPONSE_CANCEL, -1);
/* Set icon name for main (dlg) window so it displays in the panel. */
- gtk_window_set_icon_name(GTK_WINDOW(dlg), "xfwm4");
+ gtk_window_set_icon_name(GTK_WINDOW(dlg), "preferences-desktop");
/* autostart list */
init_list_view((GtkTreeView*)autostarts);
--
2.1.4
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment