summaryrefslogtreecommitdiff
path: root/recipes-lxde/lxsession/lxsession/gtk3.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-lxde/lxsession/lxsession/gtk3.patch')
-rw-r--r--recipes-lxde/lxsession/lxsession/gtk3.patch524
1 files changed, 524 insertions, 0 deletions
diff --git a/recipes-lxde/lxsession/lxsession/gtk3.patch b/recipes-lxde/lxsession/lxsession/gtk3.patch
new file mode 100644
index 0000000..282d596
--- /dev/null
+++ b/recipes-lxde/lxsession/lxsession/gtk3.patch
@@ -0,0 +1,524 @@
+Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
+
+
+Patch taken from:
+https://git.archlinux.org/svntogit/community.git/tree/trunk/gtk3.patch?h=packages/lxsession
+
+
+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
+