[Xfce4-commits] xfce4-notifyd:master Set notifications as override redirect windows (bug #10686).

2014-02-16 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 24d77f5b06c704506b4ae9d2eabdb96e56e12dae (commit)
   from b9959b2b2264d81e9bbcb2b3fc495e4d30b63061 (commit)

commit 24d77f5b06c704506b4ae9d2eabdb96e56e12dae
Author: Liquider liquid...@gmail.com
Date:   Sun Feb 16 14:04:20 2014 +0100

Set notifications as override redirect windows (bug #10686).

 xfce4-notifyd/xfce-notify-window.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index f8ffdf6..29287fa 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -318,6 +318,7 @@ xfce_notify_window_realize(GtkWidget *widget)
 
 gdk_window_set_type_hint(widget-window,
  GDK_WINDOW_TYPE_HINT_NOTIFICATION);
+gdk_window_set_override_redirect(gtk_widget_get_window(widget), TRUE);
 xfce_notify_window_start_expiration(window);
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Use accessor function to get the GdkWindow.

2014-02-16 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 93123ab4b7b73e8295102e709d5eeea398774650 (commit)
   from 24d77f5b06c704506b4ae9d2eabdb96e56e12dae (commit)

commit 93123ab4b7b73e8295102e709d5eeea398774650
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Feb 16 14:09:36 2014 +0100

Use accessor function to get the GdkWindow.

 xfce4-notifyd/xfce-notify-window.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index 29287fa..e2fc40a 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -316,7 +316,7 @@ xfce_notify_window_realize(GtkWidget *widget)
 
 GTK_WIDGET_CLASS(xfce_notify_window_parent_class)-realize(widget);
 
-gdk_window_set_type_hint(widget-window,
+gdk_window_set_type_hint(gtk_widget_get_window(widget),
  GDK_WINDOW_TYPE_HINT_NOTIFICATION);
 gdk_window_set_override_redirect(gtk_widget_get_window(widget), TRUE);
 xfce_notify_window_start_expiration(window);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Merge branch 'master' of ssh://git.xfce.org/xfce/xfce4-settings

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to 5e3315f5f623a5712623cc0b93649efcafa712b5 (commit)
   from 515f187a3112c8d55d28cd1f02071f41452c05f4 (commit)

commit 5e3315f5f623a5712623cc0b93649efcafa712b5
Merge: 515f187 b731501
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Nov 7 10:24:21 2012 +0100

Merge branch 'master' of ssh://git.xfce.org/xfce/xfce4-settings

commit b73150114b88adf0f220fb8f9bfa18f6ee9a4a36
Author: Ivica  Kolić ik...@yahoo.com
Date:   Tue Nov 6 16:30:17 2012 +0100

l10n: Updated Croatian (hr) translation to 72%

New status: 252 messages complete with 0 fuzzies and 95 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/hr.po |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/po/hr.po b/po/hr.po
index 1d7bf3d..1bd0a5b 100644
--- a/po/hr.po
+++ b/po/hr.po
@@ -7,7 +7,7 @@ msgid 
 msgstr 
 Project-Id-Version: xfce 4-settings\n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2012-11-02 18:15+\n
+POT-Creation-Date: 2012-11-06 13:12+\n
 PO-Revision-Date: 2010-06-05 17:46+0200\n
 Last-Translator: Ivica Kolićik...@yahoo.com \n
 Language-Team: Croatian \n
@@ -544,7 +544,7 @@ msgstr R_ezolucija
 
 #: ../dialogs/display-settings/display-dialog.glade.h:6
 msgid Ref_lection:
-msgstr 
+msgstr Ref_leksija:
 
 #: ../dialogs/display-settings/display-dialog.glade.h:7
 msgid Refresh _rate:
@@ -560,7 +560,7 @@ msgstr Koristi ovaj izlaz
 
 #: ../dialogs/display-settings/minimal-display-dialog.glade.h:1
 msgid Advanced
-msgstr 
+msgstr Napredno
 
 #: ../dialogs/display-settings/minimal-display-dialog.glade.h:2
 msgid Displays
@@ -568,7 +568,7 @@ msgstr Zasloni
 
 #: ../dialogs/display-settings/minimal-display-dialog.glade.h:3
 msgid Extend to the right
-msgstr 
+msgstr Proširi u desno
 
 #: ../dialogs/display-settings/minimal-display-dialog.glade.h:4
 msgid Mirror Displays
@@ -588,15 +588,15 @@ msgstr 
 
 #: ../dialogs/display-settings/main.c:90
 msgid Same as
-msgstr 
+msgstr Isto kao
 
 #: ../dialogs/display-settings/main.c:91
 msgid Above
-msgstr 
+msgstr Iznad
 
 #: ../dialogs/display-settings/main.c:92
 msgid Below
-msgstr 
+msgstr Ispod
 
 #: ../dialogs/display-settings/main.c:93
 msgid Right of
@@ -975,7 +975,7 @@ msgstr Koristite p_rilagođenu naredbu
 msgid 
 Use a custom command for an application that is not available from the above 
 application list.
-msgstr 
+msgstr Koristi prilagođenu naredbu za program koji nije dostupan sa gornje 
liste programa.
 
 #: ../dialogs/mime-settings/xfce-mime-chooser.c:223
 msgid _Browse...
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Remove leftover old accelerator.

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to ddf2778b073e8341b5ad5d4be4a282916b43e8cd (commit)
   from 5e3315f5f623a5712623cc0b93649efcafa712b5 (commit)

commit ddf2778b073e8341b5ad5d4be4a282916b43e8cd
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Nov 7 15:19:58 2012 +0100

Remove leftover old accelerator.

 dialogs/keyboard-settings/keyboard-dialog.glade |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dialogs/keyboard-settings/keyboard-dialog.glade 
b/dialogs/keyboard-settings/keyboard-dialog.glade
index 740125b..af5c861 100644
--- a/dialogs/keyboard-settings/keyboard-dialog.glade
+++ b/dialogs/keyboard-settings/keyboard-dialog.glade
@@ -522,7 +522,7 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=xalign0/property
-property name=label translatable=yesDefine 
_shortcuts for la_unching applications:/property
+property name=label translatable=yesDefine 
shortcuts for la_unching applications:/property
 property name=use_underlineTrue/property
 property 
name=mnemonic_widgetkbd_shortcuts_view/property
   /object
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Fix typo in comment.

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to 5c9ae419256c3277f4e766b3aaddaed96584ca92 (commit)
   from 863ffbe185de7423466b5c17adf740686320b628 (commit)

commit 5c9ae419256c3277f4e766b3aaddaed96584ca92
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Nov 24 00:38:33 2012 +0100

Fix typo in comment.

 dialogs/keyboard-settings/xfce-keyboard-settings.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c 
b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index 134e766..5e7a01d 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -947,7 +947,7 @@ xfce_keyboard_settings_add_button_clicked 
(XfceKeyboardSettings *settings,
   /* Create command dialog */
   command_dialog = command_dialog_new (NULL, NULL, FALSE);
 
-  /* Run command dialog until a vaild (non-empty) command is entered or the 
dialog is cancelled */
+  /* Run command dialog until a valid (non-empty) command is entered or the 
dialog is cancelled */
   do
 {
   response = command_dialog_run (COMMAND_DIALOG (command_dialog), 
GTK_WIDGET (button));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Center the buttons with an alignment.

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to 993d61b8585607913b21af6b81f74cc94bcb9db5 (commit)
   from 762ae8ed668508af536bc069ecfdde67bb9219ed (commit)

commit 993d61b8585607913b21af6b81f74cc94bcb9db5
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 12:04:45 2012 +0100

Center the buttons with an alignment.

 dialogs/keyboard-settings/keyboard-dialog.glade |  141 ---
 1 file changed, 75 insertions(+), 66 deletions(-)

diff --git a/dialogs/keyboard-settings/keyboard-dialog.glade 
b/dialogs/keyboard-settings/keyboard-dialog.glade
index 6513dc5..822816b 100644
--- a/dialogs/keyboard-settings/keyboard-dialog.glade
+++ b/dialogs/keyboard-settings/keyboard-dialog.glade
@@ -113,8 +113,8 @@
 property name=can_focusFalse/property
 property name=layout_styleend/property
 child
-  object class=GtkButton id=button1
-property name=labelgtk-help/property
+  object class=GtkButton id=button2
+property name=labelgtk-close/property
 property name=use_action_appearanceFalse/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
@@ -125,12 +125,11 @@
 property name=expandFalse/property
 property name=fillFalse/property
 property name=position0/property
-property name=secondaryTrue/property
   /packing
 /child
 child
-  object class=GtkButton id=button2
-property name=labelgtk-close/property
+  object class=GtkButton id=button1
+property name=labelgtk-help/property
 property name=use_action_appearanceFalse/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
@@ -141,6 +140,7 @@
 property name=expandFalse/property
 property name=fillFalse/property
 property name=position0/property
+property name=secondaryTrue/property
   /packing
 /child
   /object
@@ -554,75 +554,84 @@
   /packing
 /child
 child
-  object class=GtkHBox id=hbox2
+  object class=GtkAlignment id=alignment8
 property name=visibleTrue/property
 property name=can_focusFalse/property
-property name=spacing12/property
+property name=yalign0/property
+property name=xscale0/property
+property name=yscale0/property
 child
-  object class=GtkButton id=add_shortcut_button
-property name=labelgtk-add/property
-property 
name=use_action_appearanceFalse/property
+  object class=GtkHBox id=hbox2
 property name=visibleTrue/property
-property name=can_focusTrue/property
-property name=receives_defaultTrue/property
-property name=use_stockTrue/property
-  /object
-  packing
-property name=expandFalse/property
-property name=fillFalse/property
-property name=position0/property
-  /packing
-/child
-child
-  object class=GtkButton id=edit_shortcut_button
-property name=labelgtk-edit/property
-property 
name=use_action_appearanceFalse/property
-property name=visibleTrue/property
-property name=can_focusTrue/property
-property name=receives_defaultTrue/property
-property name=use_stockTrue/property
-  /object
-  packing
-property name=expandTrue/property
-property name=fillTrue/property
-property name=position1/property
-  /packing
-/child
-child
-  object class=GtkButton 
id=reset_shortcuts_button
-property name=label translatable=yesReset to 
_Defaults/property
-property 
name=use_action_appearanceFalse/property
-property name=visibleTrue/property
-property name=can_focusTrue/property
-property name

[Xfce4-commits] xfce4-settings:bluesabre/display-settings Add comments.

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to e5895031ef606614ec7489d1cdd2f840af18d6f5 (commit)
   from 1161ff583b2c946715826a514a5489a7309dacea (commit)

commit e5895031ef606614ec7489d1cdd2f840af18d6f5
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:02:58 2012 +0100

Add comments.

 dialogs/keyboard-settings/command-dialog.c |4 
 1 file changed, 4 insertions(+)

diff --git a/dialogs/keyboard-settings/command-dialog.c 
b/dialogs/keyboard-settings/command-dialog.c
index 5256b3a..a3adad3 100644
--- a/dialogs/keyboard-settings/command-dialog.c
+++ b/dialogs/keyboard-settings/command-dialog.c
@@ -122,6 +122,8 @@ command_dialog_create_contents (CommandDialog *dialog,
 
   if (!shortcut)
 {
+  /* No shortcut passed, means that we are creating a new one */
+
   const gchar *explanation;
   gchar   *explanation_markup;
 
@@ -144,6 +146,8 @@ command_dialog_create_contents (CommandDialog *dialog,
 
   if (shortcut)
 {
+  /* We are editing an existing shortcut */
+
   label = gtk_label_new (_(Shortcut:));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 
GTK_FILL, 0, 0);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Remember the settings manager window size (bug #9384).

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to b3b1986327b9b42ac6f9442443ff103f6565a323 (commit)
   from 4346168db9aba1a9d4878b6ebe9aca41fd898917 (commit)

commit b3b1986327b9b42ac6f9442443ff103f6565a323
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 09:53:58 2012 +0100

Remember the settings manager window size (bug #9384).

Handy with pluggable dialogs, allows the user to get rid of most of the
scrollbars.

 xfce4-settings-manager/Makefile.am |2 ++
 xfce4-settings-manager/main.c  |   13 +++
 .../xfce-settings-manager-dialog.c |   38 +++-
 3 files changed, 44 insertions(+), 9 deletions(-)

diff --git a/xfce4-settings-manager/Makefile.am 
b/xfce4-settings-manager/Makefile.am
index c6bdc2d..99f9b3f 100644
--- a/xfce4-settings-manager/Makefile.am
+++ b/xfce4-settings-manager/Makefile.am
@@ -20,6 +20,7 @@ xfce4_settings_manager_CFLAGS = \
$(LIBXFCE4UTIL_CFLAGS) \
$(LIBXFCE4UI_CFLAGS) \
$(GARCON_CFLAGS) \
+   $(XFCONF_CFLAGS) \
$(EXO_CFLAGS) \
$(PLATFORM_CFLAGS)
 
@@ -31,6 +32,7 @@ xfce4_settings_manager_LDADD = \
$(GTK_LIBS) \
$(LIBXFCE4UTIL_LIBS) \
$(LIBXFCE4UI_LIBS) \
+   $(XFCONF_LIBS) \
$(EXO_LIBS) \
$(GARCON_LIBS)
 
diff --git a/xfce4-settings-manager/main.c b/xfce4-settings-manager/main.c
index 3a65879..42bec66 100644
--- a/xfce4-settings-manager/main.c
+++ b/xfce4-settings-manager/main.c
@@ -28,6 +28,7 @@
 #include gtk/gtk.h
 #include libxfce4util/libxfce4util.h
 #include garcon/garcon.h
+#include xfconf/xfconf.h
 
 #include xfce-settings-manager-dialog.h
 
@@ -79,6 +80,16 @@ main(int argc,
 return EXIT_SUCCESS;
 }
 
+/* initialize xfconf */
+if (G_UNLIKELY (!xfconf_init (error)))
+{
+/* print error and leave */
+g_critical (Failed to connect to Xfconf daemon: %s, error-message);
+g_error_free (error);
+
+return EXIT_FAILURE;
+}
+
 garcon_set_environment (XFCE);
 
 dialog = xfce_settings_manager_dialog_new ();
@@ -95,5 +106,7 @@ main(int argc,
 
 gtk_main();
 
+xfconf_shutdown ();
+
 return EXIT_SUCCESS;
 }
diff --git a/xfce4-settings-manager/xfce-settings-manager-dialog.c 
b/xfce4-settings-manager/xfce-settings-manager-dialog.c
index 043b143..39e33ff 100644
--- a/xfce4-settings-manager/xfce-settings-manager-dialog.c
+++ b/xfce4-settings-manager/xfce-settings-manager-dialog.c
@@ -35,6 +35,7 @@
 
 #include libxfce4util/libxfce4util.h
 #include libxfce4ui/libxfce4ui.h
+#include xfconf/xfconf.h
 #include garcon/garcon.h
 #include exo/exo.h
 
@@ -55,6 +56,7 @@ struct _XfceSettingsManagerDialog
 {
 XfceTitledDialog __parent__;
 
+XfconfChannel  *channel;
 GarconMenu *menu;
 
 GtkListStore   *store;
@@ -156,17 +158,19 @@ xfce_settings_manager_dialog_class_init 
(XfceSettingsManagerDialogClass *klass)
 static void
 xfce_settings_manager_dialog_init (XfceSettingsManagerDialog *dialog)
 {
-GtkWidget *scroll;
+GtkWidget *align;
+GtkWidget *bbox;
 GtkWidget *dialog_vbox;
-GtkWidget *viewport;
-gchar *path;
-GtkWidget *hbox;
+GtkWidget *ebox;
 GtkWidget *entry;
-GtkWidget *align;
-GList *children;
+GtkWidget *hbox;
 GtkWidget *header;
-GtkWidget *ebox;
-GtkWidget *bbox;
+GtkWidget *scroll;
+GtkWidget *viewport;
+GList *children;
+gchar *path;
+
+dialog-channel = xfconf_channel_get (xfce4-settings-manager);
 
 dialog-store = gtk_list_store_new (N_COLUMNS,
 G_TYPE_STRING,
@@ -180,7 +184,9 @@ xfce_settings_manager_dialog_init 
(XfceSettingsManagerDialog *dialog)
 dialog-menu = garcon_menu_new_for_path (path != NULL ? path : MENUFILE);
 g_free (path);
 
-gtk_window_set_default_size (GTK_WINDOW (dialog), 640, 500);
+gtk_window_set_default_size (GTK_WINDOW (dialog),
+  xfconf_channel_get_int (dialog-channel, /last/window-width, 640),
+  xfconf_channel_get_int (dialog-channel, /last/window-height, 500));
 xfce_settings_manager_dialog_set_title (dialog, NULL, NULL, NULL);
 
 dialog-button_back = xfce_gtk_button_new_mixed (GTK_STOCK_GO_BACK, _(All 
_Settings));
@@ -334,6 +340,20 @@ xfce_settings_manager_dialog_response (GtkDialog *widget,
 }
 else
 {
+GdkWindowState state;
+gint   width, height;
+
+/* Don't save the state for full-screen windows */
+state = gdk_window_get_state (GTK_WIDGET (widget)-window);
+
+if ((state  (GDK_WINDOW_STATE_MAXIMIZED | 
GDK_WINDOW_STATE_FULLSCREEN)) == 0)
+{
+/* Save window size */
+gtk_window_get_size (GTK_WINDOW (widget), width, height);
+xfconf_channel_set_int (dialog-channel, /last/window-width, 
width),
+xfconf_channel_set_int (dialog-channel, /last/window-height, 
height

[Xfce4-commits] xfce4-settings:bluesabre/display-settings Add a button to edit keyboard shortcuts (bug #7600).

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to 6b952f0a50dd17fb5d73b73bf37df9ac6519983c (commit)
   from a04edfc41ab2035383793ca8315e2e61351108c2 (commit)

commit 6b952f0a50dd17fb5d73b73bf37df9ac6519983c
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Tue Dec 18 23:38:48 2012 +0100

Add a button to edit keyboard shortcuts (bug #7600).

 dialogs/keyboard-settings/keyboard-dialog.glade|   23 ++-
 dialogs/keyboard-settings/xfce-keyboard-settings.c |  161 
 2 files changed, 180 insertions(+), 4 deletions(-)

diff --git a/dialogs/keyboard-settings/keyboard-dialog.glade 
b/dialogs/keyboard-settings/keyboard-dialog.glade
index af5c861..6513dc5 100644
--- a/dialogs/keyboard-settings/keyboard-dialog.glade
+++ b/dialogs/keyboard-settings/keyboard-dialog.glade
@@ -574,8 +574,8 @@
   /packing
 /child
 child
-  object class=GtkButton 
id=delete_shortcut_button
-property name=labelgtk-remove/property
+  object class=GtkButton id=edit_shortcut_button
+property name=labelgtk-edit/property
 property 
name=use_action_appearanceFalse/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
@@ -583,8 +583,8 @@
 property name=use_stockTrue/property
   /object
   packing
-property name=expandFalse/property
-property name=fillFalse/property
+property name=expandTrue/property
+property name=fillTrue/property
 property name=position1/property
   /packing
 /child
@@ -604,6 +604,21 @@
 property name=position2/property
   /packing
 /child
+child
+  object class=GtkButton 
id=delete_shortcut_button
+property name=labelgtk-remove/property
+property 
name=use_action_appearanceFalse/property
+property name=visibleTrue/property
+property name=can_focusTrue/property
+property name=receives_defaultTrue/property
+property name=use_stockTrue/property
+  /object
+  packing
+property name=expandFalse/property
+property name=fillFalse/property
+property name=position3/property
+  /packing
+/child
   /object
   packing
 property name=expandFalse/property
diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c 
b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index 34ae50e..a0e3cbc 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -130,6 +130,7 @@ static void  
xfce_keyboard_settings_shortcut_removed  (X

XfceKeyboardSettings  *settings);
 static void  xfce_keyboard_settings_add_button_clicked
(XfceKeyboardSettings  *settings,

GtkButton *button);
+static void  xfce_keyboard_settings_edit_button_clicked   
(XfceKeyboardSettings  *settings);
 static void  xfce_keyboard_settings_delete_button_clicked 
(XfceKeyboardSettings  *settings);
 static void  xfce_keyboard_settings_reset_button_clicked  
(XfceKeyboardSettings  *settings);
 
@@ -405,6 +406,10 @@ xfce_keyboard_settings_constructed (GObject *object)
   button = gtk_builder_get_object (GTK_BUILDER (settings), 
add_shortcut_button);
   g_signal_connect_swapped (button, clicked, G_CALLBACK 
(xfce_keyboard_settings_add_button_clicked), settings);
 
+  /* Connect to edit button */
+  button = gtk_builder_get_object (GTK_BUILDER (settings), 
edit_shortcut_button);
+  g_signal_connect_swapped (button, clicked, G_CALLBACK 
(xfce_keyboard_settings_edit_button_clicked), settings);
+
   /* Connect to remove button */
   button = gtk_builder_get_object (GTK_BUILDER (settings), 
delete_shortcut_button);
   g_signal_connect_swapped (button, clicked, G_CALLBACK 
(xfce_keyboard_settings_delete_button_clicked), settings);
@@ -1010,6 +1015,162 @@ xfce_keyboard_settings_add_button_clicked 
(XfceKeyboardSettings

[Xfce4-commits] xfce4-settings:bluesabre/display-settings Tweak buttons positions.

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to cd952f2777ffa11e48c003f0795ba5d55c798340 (commit)
   from 0b39613666ee95df3dbba6a5c9d1470799104a34 (commit)

commit cd952f2777ffa11e48c003f0795ba5d55c798340
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 27 11:33:36 2012 +0100

Tweak buttons positions.

Group buttons which act on individual shortcuts to the left and put
Reset to defaults with some padding on the right as it will reset all
shortcuts.

 dialogs/keyboard-settings/keyboard-dialog.glade |   39 ---
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/dialogs/keyboard-settings/keyboard-dialog.glade 
b/dialogs/keyboard-settings/keyboard-dialog.glade
index 822816b..72aec7f 100644
--- a/dialogs/keyboard-settings/keyboard-dialog.glade
+++ b/dialogs/keyboard-settings/keyboard-dialog.glade
@@ -8,6 +8,11 @@
 property name=can_focusFalse/property
 property name=stockgtk-revert-to-saved/property
   /object
+  object class=GtkImage id=image2
+property name=visibleTrue/property
+property name=can_focusFalse/property
+property name=stockgtk-revert-to-saved/property
+  /object
   object class=XfceTitledDialog id=keyboard-layout-selection-dialog
 property name=can_focusFalse/property
 property name=title translatable=yesKeyboard layout 
selection/property
@@ -113,8 +118,8 @@
 property name=can_focusFalse/property
 property name=layout_styleend/property
 child
-  object class=GtkButton id=button2
-property name=labelgtk-close/property
+  object class=GtkButton id=button1
+property name=labelgtk-help/property
 property name=use_action_appearanceFalse/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
@@ -125,11 +130,12 @@
 property name=expandFalse/property
 property name=fillFalse/property
 property name=position0/property
+property name=secondaryTrue/property
   /packing
 /child
 child
-  object class=GtkButton id=button1
-property name=labelgtk-help/property
+  object class=GtkButton id=button2
+property name=labelgtk-close/property
 property name=use_action_appearanceFalse/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
@@ -140,7 +146,6 @@
 property name=expandFalse/property
 property name=fillFalse/property
 property name=position0/property
-property name=secondaryTrue/property
   /packing
 /child
   /object
@@ -596,14 +601,13 @@
   /packing
 /child
 child
-  object class=GtkButton 
id=reset_shortcuts_button
-property name=label 
translatable=yesReset to _Defaults/property
+  object class=GtkButton 
id=delete_shortcut_button
+property name=labelgtk-remove/property
 property 
name=use_action_appearanceFalse/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
 property 
name=receives_defaultTrue/property
-property name=imageimage1/property
-property name=use_underlineTrue/property
+property name=use_stockTrue/property
   /object
   packing
 property name=expandFalse/property
@@ -612,17 +616,19 @@
   /packing
 /child
 child
-  object class=GtkButton 
id=delete_shortcut_button
-property name=labelgtk-remove/property
+  object class=GtkButton 
id=reset_shortcuts_button
+property name=label 
translatable=yesReset to _Defaults/property
 property 
name=use_action_appearanceFalse/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
 property 
name=receives_defaultTrue/property
-property name=use_stockTrue/property
+property name=imageimage1/property
+property name=use_underlineTrue/property

[Xfce4-commits] xfce4-settings:bluesabre/display-settings Show shortcut label when editing a shortcut.

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to 0b39613666ee95df3dbba6a5c9d1470799104a34 (commit)
   from 993d61b8585607913b21af6b81f74cc94bcb9db5 (commit)

commit 0b39613666ee95df3dbba6a5c9d1470799104a34
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 27 11:28:16 2012 +0100

Show shortcut label when editing a shortcut.

 dialogs/keyboard-settings/xfce-keyboard-settings.c |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c 
b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index 6880d95..a7529c8 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -1084,12 +1084,14 @@ xfce_keyboard_settings_edit_button_clicked 
(XfceKeyboardSettings *settings)
   GtkWidget *command_dialog;
   gboolean  finished;
   gboolean  snotify;
+  gchar*shortcut_label;
   gchar*shortcut;
   gchar*command;
   gint  response;
 
   /* Read row values */
   gtk_tree_model_get (model, iter,
+  SHORTCUT_LABEL_COLUMN, shortcut_label,
   SHORTCUT_COLUMN, shortcut,
   COMMAND_COLUMN, command,
   SNOTIFY_COLUMN, snotify,
@@ -1098,7 +1100,7 @@ xfce_keyboard_settings_edit_button_clicked 
(XfceKeyboardSettings *settings)
   DBG (Edit shortcut %s / command %s, shortcut, command);
 
   /* Create command dialog */
-  command_dialog = command_dialog_new (shortcut, command, snotify);
+  command_dialog = command_dialog_new (shortcut_label, command, 
snotify);
 
   /* Run command dialog until a valid (non-empty) command is entered 
or the dialog is cancelled */
   do
@@ -1187,6 +1189,7 @@ xfce_keyboard_settings_edit_button_clicked 
(XfceKeyboardSettings *settings)
   gtk_widget_destroy (shortcut_dialog);
 }
 
+  g_free (shortcut_label);
   g_free (shortcut);
   g_free (command);
   gtk_widget_destroy (command_dialog);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Keep the shortcut dialog above other windows.

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to a04edfc41ab2035383793ca8315e2e61351108c2 (commit)
   from 908e44ea981b845092ef99630d4e4705a35e0f01 (commit)

commit a04edfc41ab2035383793ca8315e2e61351108c2
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Tue Dec 18 22:20:52 2012 +0100

Keep the shortcut dialog above other windows.

This dialog grabs the keyboard which makes it unusable in other
applications, so keeping the window above the other gives a hint on what
is happening.

 dialogs/keyboard-settings/xfce-keyboard-settings.c |   11 +++
 1 file changed, 11 insertions(+)

diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c 
b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index 5e7a01d..34ae50e 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -662,6 +662,12 @@ xfce_keyboard_settings_edit_shortcut (XfceKeyboardSettings 
*settings,
   /* Request a new shortcut from the user */
   dialog = xfce_shortcut_dialog_new (commands, command, command);
   g_signal_connect (dialog, validate-shortcut, G_CALLBACK 
(xfce_keyboard_settings_validate_shortcut), settings);
+
+  /* Try to keep the window above as it grabs the keyboard, we don't
+   * want users to wonder why the keyboard does not work in another
+   * window */
+  gtk_window_set_keep_above (GTK_WINDOW (dialog), TRUE);
+
   response = xfce_shortcut_dialog_run (XFCE_SHORTCUT_DIALOG (dialog), 
gtk_widget_get_toplevel (GTK_WIDGET (tree_view)));
 
   if (G_LIKELY (response == GTK_RESPONSE_OK))
@@ -974,6 +980,11 @@ xfce_keyboard_settings_add_button_clicked 
(XfceKeyboardSettings *settings,
   shortcut_dialog = xfce_shortcut_dialog_new (commands, command, 
command);
   g_signal_connect (shortcut_dialog, validate-shortcut, G_CALLBACK 
(xfce_keyboard_settings_validate_shortcut), settings);
 
+  /* Try to keep the window above as it grabs the keyboard, we don't
+   * want users to wonder why the keyboard does not work in another
+   * window */
+  gtk_window_set_keep_above (GTK_WINDOW (shortcut_dialog), TRUE);
+
   /* Run shortcut dialog until a valid shortcut is entered or the dialog 
is cancelled */
   parent = gtk_builder_get_object (GTK_BUILDER (settings), 
keyboard-shortcuts-dialog);
   response = xfce_shortcut_dialog_run (XFCE_SHORTCUT_DIALOG 
(shortcut_dialog), GTK_WIDGET (parent));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Don't use Both in comboboxes (bug #9491).

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to 4346168db9aba1a9d4878b6ebe9aca41fd898917 (commit)
   from a04edfc41ab2035383793ca8315e2e61351108c2 (commit)

commit 4346168db9aba1a9d4878b6ebe9aca41fd898917
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 09:27:19 2012 +0100

Don't use Both in comboboxes (bug #9491).

 dialogs/appearance-settings/appearance-dialog.glade |   16 
 dialogs/display-settings/main.c |8 
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/dialogs/appearance-settings/appearance-dialog.glade 
b/dialogs/appearance-settings/appearance-dialog.glade
index a6c656d..34b975b 100644
--- a/dialogs/appearance-settings/appearance-dialog.glade
+++ b/dialogs/appearance-settings/appearance-dialog.glade
@@ -21,8 +21,8 @@
 property name=can_focusFalse/property
 property name=layout_styleend/property
 child
-  object class=GtkButton id=button2
-property name=labelgtk-help/property
+  object class=GtkButton id=button1
+property name=labelgtk-close/property
 property name=use_action_appearanceFalse/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
@@ -33,12 +33,11 @@
 property name=expandFalse/property
 property name=fillFalse/property
 property name=position0/property
-property name=secondaryTrue/property
   /packing
 /child
 child
-  object class=GtkButton id=button1
-property name=labelgtk-close/property
+  object class=GtkButton id=button2
+property name=labelgtk-help/property
 property name=use_action_appearanceFalse/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
@@ -49,6 +48,7 @@
 property name=expandFalse/property
 property name=fillFalse/property
 property name=position0/property
+property name=secondaryTrue/property
   /packing
 /child
   /object
@@ -646,8 +646,8 @@
   /object
 /child
 action-widgets
-  action-widget response=-11button2/action-widget
   action-widget response=0button1/action-widget
+  action-widget response=-11button2/action-widget
 /action-widgets
   /object
   object class=GtkListStore id=liststore1
@@ -683,10 +683,10 @@
 col id=0 translatable=yesText/col
   /row
   row
-col id=0 translatable=yesBoth/col
+col id=0 translatable=yesText under icons/col
   /row
   row
-col id=0 translatable=yesBoth Horizontal/col
+col id=0 translatable=yesText next to icons/col
   /row
 /data
   /object
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 4136542..6dcfc5b 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -114,7 +114,7 @@ static const XfceRotation reflection_names[] =
 { 0, N_(None) },
 { RR_Reflect_X,  N_(Horizontal) },
 { RR_Reflect_Y,  N_(Vertical) },
-{ RR_Reflect_X|RR_Reflect_Y, N_(Both) }
+{ RR_Reflect_X|RR_Reflect_Y, N_(Horizontal and Vertical) }
 };
 
 
@@ -1516,7 +1516,7 @@ display_settings_dialog_new (GtkBuilder *builder)
 combobox = gtk_builder_get_object (builder, randr-rotation);
 display_settings_combo_box_create (GTK_COMBO_BOX (combobox));
 g_signal_connect (G_OBJECT (combobox), changed, G_CALLBACK 
(display_setting_rotations_changed), builder);
-
+
 check = gtk_builder_get_object (builder, minimal-autoshow);
 xfconf_g_property_bind (display_channel, /Notify, G_TYPE_BOOLEAN, check,
 active);
@@ -1772,8 +1772,8 @@ display_settings_show_main_dialog (GdkDisplay *display)
 }
 
 static gboolean
-display_settings_minimal_dialog_key_press_event(GtkWidget *widget, 
-GdkEventKey *event, 
+display_settings_minimal_dialog_key_press_event(GtkWidget *widget,
+GdkEventKey *event,
 gpointer user_data)
 {
 if (event-keyval == GDK_Escape)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Remove ignore_property argument in xfce_keyboard_settings_get_shortcut_info.

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to 454bb81a61aa4743e58db8ef1a142a5995138f39 (commit)
   from cd952f2777ffa11e48c003f0795ba5d55c798340 (commit)

commit 454bb81a61aa4743e58db8ef1a142a5995138f39
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 30 10:31:42 2012 +0100

Remove ignore_property argument in xfce_keyboard_settings_get_shortcut_info.

This argument was not used and it clutters the logs.

 dialogs/keyboard-settings/xfce-keyboard-settings.c |   14 --
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c 
b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index a7529c8..b6f8b0c 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -120,8 +120,7 @@ static gboolean  
xfce_keyboard_settings_validate_shortcut (X

const gchar   *shortcut,

XfceKeyboardSettings  *settings);
 static XfceKeyboardShortcutInfo *xfce_keyboard_settings_get_shortcut_info 
(XfceKeyboardSettings  *settings,
-   
const gchar   *shortcut,
-   
const gchar   *ignore_property);
+   
const gchar   *shortcut);
 static void  xfce_keyboard_settings_free_shortcut_info
(XfceKeyboardShortcutInfo  *info);
 static void  xfce_keyboard_settings_shortcut_added
(XfceShortcutsProvider *provider,

const gchar   *shortcut,
@@ -777,7 +776,6 @@ xfce_keyboard_settings_validate_shortcut 
(XfceShortcutDialog   *dialog,
   XfceKeyboardSettings *settings)
 {
   XfceKeyboardShortcutInfo *info;
-  gchar*property;
   gboolean  accepted = TRUE;
   gint  response;
 
@@ -795,9 +793,7 @@ xfce_keyboard_settings_validate_shortcut 
(XfceShortcutDialog   *dialog,
 
   DBG (Validating shortcut = %s, shortcut);
 
-  property = g_strconcat (CUSTOM_BASE_PROPERTY, /, shortcut, NULL);
-  info = xfce_keyboard_settings_get_shortcut_info (settings, shortcut, 
property);
-  g_free (property);
+  info = xfce_keyboard_settings_get_shortcut_info (settings, shortcut);
 
   if (G_UNLIKELY (info != NULL))
 {
@@ -838,8 +834,7 @@ xfce_keyboard_settings_validate_shortcut 
(XfceShortcutDialog   *dialog,
 
 static XfceKeyboardShortcutInfo *
 xfce_keyboard_settings_get_shortcut_info (XfceKeyboardSettings *settings,
-  const gchar  *shortcut,
-  const gchar  
*ignore_property)
+  const gchar  *shortcut)
 {
   XfceKeyboardShortcutInfo *info = NULL;
   GList*iter;
@@ -849,7 +844,7 @@ xfce_keyboard_settings_get_shortcut_info 
(XfceKeyboardSettings *settings,
   g_return_val_if_fail (XFCE_IS_KEYBOARD_SETTINGS (settings), FALSE);
   g_return_val_if_fail (shortcut != NULL, FALSE);
 
-  DBG (shortcut = %s, ignore_property = %s, shortcut, ignore_property);
+  DBG (Looking for shortcut info for %s, shortcut);
 
   providers = xfce_shortcuts_provider_get_providers ();
 
@@ -864,7 +859,6 @@ xfce_keyboard_settings_get_shortcut_info 
(XfceKeyboardSettings *settings,
 
   if (G_LIKELY (sc != NULL))
 {
-  /* Check ignore_property and change shortcut info struct */
   info = g_new0 (XfceKeyboardShortcutInfo, 1);
   info-provider = g_object_ref (iter-data);
   info-shortcut = sc;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Set parent window for the conflict dialog.

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to b1b9fa1598e54093c4a9682b875f083dfb0a2a74 (commit)
   from 849aa7824f8a482496c05b1fd77099e062d1c92b (commit)

commit b1b9fa1598e54093c4a9682b875f083dfb0a2a74
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 11:03:03 2012 +0100

Set parent window for the conflict dialog.

 dialogs/keyboard-settings/xfce-keyboard-settings.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c 
b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index 1e83e75..0a01e1a 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -797,7 +797,8 @@ xfce_keyboard_settings_validate_shortcut 
(XfceShortcutDialog   *dialog,
 
   if (G_UNLIKELY (info != NULL))
 {
-  response = xfce_shortcut_conflict_dialog 
(xfce_shortcuts_provider_get_name (settings-priv-provider),
+  response = xfce_shortcut_conflict_dialog (GTK_WINDOW (dialog),
+
xfce_shortcuts_provider_get_name (settings-priv-provider),
 
xfce_shortcuts_provider_get_name (info-provider),
 shortcut,
 
xfce_shortcut_dialog_get_action_name (dialog),
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Improve the contents of the command dialog.

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to 1161ff583b2c946715826a514a5489a7309dacea (commit)
   from b1b9fa1598e54093c4a9682b875f083dfb0a2a74 (commit)

commit 1161ff583b2c946715826a514a5489a7309dacea
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:00:57 2012 +0100

Improve the contents of the command dialog.

When creating a shortcut show an explanation instead of an empty
shortcut label. Show the shortcut label when we have one instead of the
raw Gtk+ accelerator string.

 dialogs/keyboard-settings/command-dialog.c |   36 +++-
 dialogs/keyboard-settings/xfce-keyboard-settings.c |6 +++-
 2 files changed, 32 insertions(+), 10 deletions(-)

diff --git a/dialogs/keyboard-settings/command-dialog.c 
b/dialogs/keyboard-settings/command-dialog.c
index 7216c7b..5256b3a 100644
--- a/dialogs/keyboard-settings/command-dialog.c
+++ b/dialogs/keyboard-settings/command-dialog.c
@@ -120,6 +120,21 @@ command_dialog_create_contents (CommandDialog *dialog,
   gtk_widget_grab_default (button);
   gtk_widget_show (button);
 
+  if (!shortcut)
+{
+  const gchar *explanation;
+  gchar   *explanation_markup;
+
+  label = gtk_label_new (NULL);
+
+  explanation = _(Enter the command you want to trigger with a 
shortcut.);
+  explanation_markup = g_strdup_printf (i%s/i, explanation);
+  gtk_label_set_markup (GTK_LABEL (label), explanation_markup);
+  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG 
(dialog))),
+  label, FALSE, FALSE, 0);
+  gtk_widget_show (label);
+}
+
   table = gtk_table_new (3, 2, FALSE);
   gtk_table_set_row_spacings (GTK_TABLE (table), 6);
   gtk_table_set_col_spacings (GTK_TABLE (table), 12);
@@ -127,15 +142,18 @@ command_dialog_create_contents (CommandDialog *dialog,
   gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)-vbox), table);
   gtk_widget_show (table);
 
-  label = gtk_label_new (_(Shortcut:));
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 
0, 0);
-  gtk_widget_show (label);
-
-  label = gtk_label_new (shortcut);
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_FILL, GTK_FILL, 
0, 0);
-  gtk_widget_show (label);
+  if (shortcut)
+{
+  label = gtk_label_new (_(Shortcut:));
+  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 
GTK_FILL, 0, 0);
+  gtk_widget_show (label);
+
+  label = gtk_label_new (shortcut);
+  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+  gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_FILL, 
GTK_FILL, 0, 0);
+  gtk_widget_show (label);
+}
 
   label = gtk_label_new (_(Command:));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c 
b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index 0a01e1a..6880d95 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -728,14 +728,17 @@ xfce_keyboard_settings_edit_command (XfceKeyboardSettings 
*settings,
   /* Convert tree path to tree iter */
   if (G_LIKELY (gtk_tree_model_get_iter (model, iter, path)))
 {
+  gchar *shortcut_label;
+
   /* Read shortcut and current command from the activated row */
   gtk_tree_model_get (model, iter,
   COMMAND_COLUMN, command,
   SHORTCUT_COLUMN, shortcut,
+  SHORTCUT_LABEL_COLUMN, shortcut_label,
   SNOTIFY_COLUMN, snotify, -1);
 
   /* Request a new command from the user */
-  dialog = command_dialog_new (shortcut, command, snotify);
+  dialog = command_dialog_new (shortcut_label, command, snotify);
   response = command_dialog_run (COMMAND_DIALOG (dialog), GTK_WIDGET 
(tree_view));
 
   if (G_LIKELY (response == GTK_RESPONSE_OK))
@@ -760,6 +763,7 @@ xfce_keyboard_settings_edit_command (XfceKeyboardSettings 
*settings,
   gtk_widget_destroy (dialog);
 
   /* Free strings */
+  g_free (shortcut_label);
   g_free (shortcut);
   g_free (command);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Show the label instead of the accelerator string.

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to 276875f5f784894b1c75c1b7dd93b599a6235a4c (commit)
   from 6b952f0a50dd17fb5d73b73bf37df9ac6519983c (commit)

commit 276875f5f784894b1c75c1b7dd93b599a6235a4c
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Tue Dec 18 23:59:02 2012 +0100

Show the label instead of the accelerator string.

The dialog is far friendlier that way: we have human readable and
translated strings representing the shortcut instead of a bare Gtk+
accelerator.

 dialogs/keyboard-settings/xfce-keyboard-settings.c |   37 
 1 file changed, 30 insertions(+), 7 deletions(-)

diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c 
b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index a0e3cbc..fd8b70e 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -58,6 +58,7 @@ enum
   COMMAND_COLUMN,
   SHORTCUT_COLUMN,
   SNOTIFY_COLUMN,
+  SHORTCUT_LABEL_COLUMN,
   N_COLUMNS
 };
 
@@ -388,7 +389,7 @@ xfce_keyboard_settings_constructed (GObject *object)
   g_signal_connect (kbd_shortcuts_view, row-activated, G_CALLBACK 
(xfce_keyboard_settings_row_activated), settings);
 
   /* Create list store for keyboard shortcuts */
-  list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, 
G_TYPE_BOOLEAN);
+  list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, 
G_TYPE_BOOLEAN, G_TYPE_STRING);
   gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (list_store), 
COMMAND_COLUMN, GTK_SORT_ASCENDING);
   gtk_tree_view_set_model (GTK_TREE_VIEW (kbd_shortcuts_view), GTK_TREE_MODEL 
(list_store));
 
@@ -399,7 +400,7 @@ xfce_keyboard_settings_constructed (GObject *object)
 
   /* Create shortcut column */
   renderer = gtk_cell_renderer_text_new ();
-  column = gtk_tree_view_column_new_with_attributes (_(Shortcut), renderer, 
text, SHORTCUT_COLUMN, NULL);
+  column = gtk_tree_view_column_new_with_attributes (_(Shortcut), renderer, 
text, SHORTCUT_LABEL_COLUMN, NULL);
   gtk_tree_view_append_column (GTK_TREE_VIEW (kbd_shortcuts_view), column);
 
   /* Connect to add button */
@@ -591,9 +592,12 @@ static void
 _xfce_keyboard_settings_load_shortcut (XfceShortcut *shortcut,
XfceKeyboardSettings *settings)
 {
-  GtkTreeModel *tree_model;
-  GtkTreeIter   iter;
-  GObject  *tree_view;
+  GdkModifierType  modifiers;
+  GtkTreeModel*tree_model;
+  GtkTreeIter  iter;
+  GObject *tree_view;
+  guintkeyval;
+  gchar   *label;
 
   g_return_if_fail (XFCE_IS_KEYBOARD_SETTINGS (settings));
   g_return_if_fail (shortcut != NULL);
@@ -605,11 +609,18 @@ _xfce_keyboard_settings_load_shortcut (XfceShortcut   
  *shortcut,
   tree_view = gtk_builder_get_object (GTK_BUILDER (settings), 
kbd_shortcuts_view);
   tree_model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
 
+  /* Get the shortcut label */
+  gtk_accelerator_parse (shortcut-shortcut, keyval, modifiers);
+  label = gtk_accelerator_get_label (keyval, modifiers);
+
   gtk_list_store_append (GTK_LIST_STORE (tree_model), iter);
   gtk_list_store_set (GTK_LIST_STORE (tree_model), iter,
   COMMAND_COLUMN, shortcut-command,
   SHORTCUT_COLUMN, shortcut-shortcut,
-  SNOTIFY_COLUMN, shortcut-snotify, -1);
+  SNOTIFY_COLUMN, shortcut-snotify,
+  SHORTCUT_LABEL_COLUMN, label, -1);
+
+  g_free (label);
 }
 
 
@@ -884,11 +895,23 @@ xfce_keyboard_settings_shortcut_added 
(XfceShortcutsProvider *provider,
 
   if (G_LIKELY (sc != NULL))
 {
+  GdkModifierType  modifiers;
+  guintkeyval;
+  gchar   *label;
+
   gtk_list_store_append (GTK_LIST_STORE (model), iter);
+
+  /* Get the shortcut label */
+  gtk_accelerator_parse (sc-shortcut, keyval, modifiers);
+  label = gtk_accelerator_get_label (keyval, modifiers);
+
   gtk_list_store_set (GTK_LIST_STORE (model), iter,
   SHORTCUT_COLUMN, shortcut,
   COMMAND_COLUMN, sc-command,
-  SNOTIFY_COLUMN, sc-snotify, -1);
+  SNOTIFY_COLUMN, sc-snotify,
+  SHORTCUT_LABEL_COLUMN, label, -1);
+
+  g_free (label);
 
   xfce_shortcut_free (sc);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Fix treeview update when handling conflict (bug #8856).

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to 849aa7824f8a482496c05b1fd77099e062d1c92b (commit)
   from 5e1aedff6e3b9b84429d38db4f0558d423cf7d08 (commit)

commit 849aa7824f8a482496c05b1fd77099e062d1c92b
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 00:02:17 2012 +0100

Fix treeview update when handling conflict (bug #8856).

In a conflict, when we chose to use the new command for the shortcut, we
need to remove the old shortcut manually from the treeview because the
signals are not necessarilly received in the logical order.

 dialogs/keyboard-settings/xfce-keyboard-settings.c |   23 ++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c 
b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index 917e35e..1e83e75 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -789,7 +789,7 @@ xfce_keyboard_settings_validate_shortcut 
(XfceShortcutDialog   *dialog,
   if (G_UNLIKELY (g_utf8_collate (shortcut, Return) == 0 || g_utf8_collate 
(shortcut, space) == 0))
 return FALSE;
 
-  DBG (shortcut = %s, shortcut);
+  DBG (Validating shortcut = %s, shortcut);
 
   property = g_strconcat (CUSTOM_BASE_PROPERTY, /, shortcut, NULL);
   info = xfce_keyboard_settings_get_shortcut_info (settings, shortcut, 
property);
@@ -805,9 +805,23 @@ xfce_keyboard_settings_validate_shortcut 
(XfceShortcutDialog   *dialog,
 FALSE);
 
   if (G_UNLIKELY (response == GTK_RESPONSE_ACCEPT))
+{
+/* We want to use the shortcut with the new owner */
+DBG (We want to use %s with %s, shortcut,
+ xfce_shortcut_dialog_get_action_name (dialog));
 xfce_shortcuts_provider_reset_shortcut (info-provider, shortcut);
+
+/*Remove the shortcut manually from the treeview */
+xfce_keyboard_settings_shortcut_removed (settings-priv-provider,
+ shortcut,
+ settings);
+}
   else
-accepted = FALSE;
+{
+  /* We want to keep the old owner */
+  DBG (We want to keep using %s with %s, shortcut, 
info-shortcut-command);
+  accepted = FALSE;
+}
 
   xfce_keyboard_settings_free_shortcut_info (info);
 }
@@ -899,6 +913,8 @@ xfce_keyboard_settings_shortcut_added 
(XfceShortcutsProvider *provider,
   gtk_accelerator_parse (sc-shortcut, keyval, modifiers);
   label = gtk_accelerator_get_label (keyval, modifiers);
 
+  DBG (Add shortcut %s for command %s, shortcut, sc-command);
+
   gtk_list_store_set (GTK_LIST_STORE (model), iter,
   SHORTCUT_COLUMN, shortcut,
   COMMAND_COLUMN, sc-command,
@@ -951,6 +967,8 @@ xfce_keyboard_settings_shortcut_removed 
(XfceShortcutsProvider *provider,
   view = gtk_builder_get_object (GTK_BUILDER (settings), kbd_shortcuts_view);
   model = gtk_tree_view_get_model (GTK_TREE_VIEW (view));
 
+  DBG (Remove shortcut %s from treeview, shortcut);
+
   gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc) 
_xfce_keyboard_settings_remove_shortcut,
   (gpointer) shortcut);
 }
@@ -1013,6 +1031,7 @@ xfce_keyboard_settings_add_button_clicked 
(XfceKeyboardSettings *settings,
   shortcut = xfce_shortcut_dialog_get_shortcut (XFCE_SHORTCUT_DIALOG 
(shortcut_dialog));
 
   /* Save the new shortcut to xfconf */
+  DBG (Save shortcut %s with command %s to Xfconf, shortcut, 
command);
   xfce_shortcuts_provider_set_shortcut (settings-priv-provider, 
shortcut, command, snotify);
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Merge branch 'jeromeg/keyboard-shortcuts'

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to f381c4e767e553463f7f5ee997e240f200e49ac5 (commit)
   from 3966322dd74753d187f7eedea826a939d35322b6 (commit)

commit f381c4e767e553463f7f5ee997e240f200e49ac5
Merge: 3966322 454bb81
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 30 15:36:45 2012 +0100

Merge branch 'jeromeg/keyboard-shortcuts'

commit 454bb81a61aa4743e58db8ef1a142a5995138f39
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 30 10:31:42 2012 +0100

Remove ignore_property argument in xfce_keyboard_settings_get_shortcut_info.

This argument was not used and it clutters the logs.

commit cd952f2777ffa11e48c003f0795ba5d55c798340
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 27 11:33:36 2012 +0100

Tweak buttons positions.

Group buttons which act on individual shortcuts to the left and put
Reset to defaults with some padding on the right as it will reset all
shortcuts.

commit 0b39613666ee95df3dbba6a5c9d1470799104a34
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 27 11:28:16 2012 +0100

Show shortcut label when editing a shortcut.

commit 993d61b8585607913b21af6b81f74cc94bcb9db5
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 12:04:45 2012 +0100

Center the buttons with an alignment.

commit 762ae8ed668508af536bc069ecfdde67bb9219ed
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:16:21 2012 +0100

Improve layout of command dialog.

commit e5895031ef606614ec7489d1cdd2f840af18d6f5
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:02:58 2012 +0100

Add comments.

commit 1161ff583b2c946715826a514a5489a7309dacea
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:00:57 2012 +0100

Improve the contents of the command dialog.

When creating a shortcut show an explanation instead of an empty
shortcut label. Show the shortcut label when we have one instead of the
raw Gtk+ accelerator string.

commit b1b9fa1598e54093c4a9682b875f083dfb0a2a74
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 11:03:03 2012 +0100

Set parent window for the conflict dialog.

commit 849aa7824f8a482496c05b1fd77099e062d1c92b
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 00:02:17 2012 +0100

Fix treeview update when handling conflict (bug #8856).

In a conflict, when we chose to use the new command for the shortcut, we
need to remove the old shortcut manually from the treeview because the
signals are not necessarilly received in the logical order.

commit 5e1aedff6e3b9b84429d38db4f0558d423cf7d08
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 23:03:56 2012 +0100

Revert Keep the shortcut dialog above other windows.

This reverts commit a04edfc41ab2035383793ca8315e2e61351108c2.

Error and conflict dialogs are kept under the grab dialog which makes
them unusable.

commit 276875f5f784894b1c75c1b7dd93b599a6235a4c
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Tue Dec 18 23:59:02 2012 +0100

Show the label instead of the accelerator string.

The dialog is far friendlier that way: we have human readable and
translated strings representing the shortcut instead of a bare Gtk+
accelerator.

commit 6b952f0a50dd17fb5d73b73bf37df9ac6519983c
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Tue Dec 18 23:38:48 2012 +0100

Add a button to edit keyboard shortcuts (bug #7600).

 dialogs/keyboard-settings/command-dialog.c |   58 -
 dialogs/keyboard-settings/keyboard-dialog.glade|  127 ++
 dialogs/keyboard-settings/xfce-keyboard-settings.c |  247 ++--
 3 files changed, 349 insertions(+), 83 deletions(-)

diff --git a/dialogs/keyboard-settings/command-dialog.c 
b/dialogs/keyboard-settings/command-dialog.c
index 7216c7b..3d24f18 100644
--- a/dialogs/keyboard-settings/command-dialog.c
+++ b/dialogs/keyboard-settings/command-dialog.c
@@ -97,10 +97,12 @@ command_dialog_create_contents (CommandDialog *dialog,
 const gchar   *action,
 gboolean   snotify)
 {
+  GtkWidget *alignment;
   GtkWidget *button;
-  GtkWidget *table;
-  GtkWidget *label;
+  GtkWidget *content_box;
   GtkWidget *hbox;
+  GtkWidget *label;
+  GtkWidget *table;
 
   /* Set dialog title and icon */
   gtk_window_set_title (GTK_WINDOW (dialog), _(Shortcut Command));
@@ -120,22 +122,56 @@ command_dialog_create_contents (CommandDialog *dialog,
   gtk_widget_grab_default (button);
   gtk_widget_show (button);
 
+  /* Set the main box layout */
+  alignment = gtk_alignment_new (0, 0, 1, 1);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 6, 12, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (alignment), 0);
+  gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG 
(dialog))),
+alignment);
+  gtk_widget_show

[Xfce4-commits] xfce4-settings:bluesabre/display-settings Improve layout of command dialog.

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to 762ae8ed668508af536bc069ecfdde67bb9219ed (commit)
   from e5895031ef606614ec7489d1cdd2f840af18d6f5 (commit)

commit 762ae8ed668508af536bc069ecfdde67bb9219ed
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:16:21 2012 +0100

Improve layout of command dialog.

 dialogs/keyboard-settings/command-dialog.c |   24 +++-
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/dialogs/keyboard-settings/command-dialog.c 
b/dialogs/keyboard-settings/command-dialog.c
index a3adad3..3d24f18 100644
--- a/dialogs/keyboard-settings/command-dialog.c
+++ b/dialogs/keyboard-settings/command-dialog.c
@@ -97,10 +97,12 @@ command_dialog_create_contents (CommandDialog *dialog,
 const gchar   *action,
 gboolean   snotify)
 {
+  GtkWidget *alignment;
   GtkWidget *button;
-  GtkWidget *table;
-  GtkWidget *label;
+  GtkWidget *content_box;
   GtkWidget *hbox;
+  GtkWidget *label;
+  GtkWidget *table;
 
   /* Set dialog title and icon */
   gtk_window_set_title (GTK_WINDOW (dialog), _(Shortcut Command));
@@ -120,6 +122,19 @@ command_dialog_create_contents (CommandDialog *dialog,
   gtk_widget_grab_default (button);
   gtk_widget_show (button);
 
+  /* Set the main box layout */
+  alignment = gtk_alignment_new (0, 0, 1, 1);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 6, 12, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (alignment), 0);
+  gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG 
(dialog))),
+alignment);
+  gtk_widget_show (alignment);
+
+  content_box = gtk_vbox_new (FALSE, 6);
+  gtk_container_set_border_width (GTK_CONTAINER (content_box), 6);
+  gtk_container_add (GTK_CONTAINER (alignment), content_box);
+  gtk_widget_show (content_box);
+
   if (!shortcut)
 {
   /* No shortcut passed, means that we are creating a new one */
@@ -132,8 +147,7 @@ command_dialog_create_contents (CommandDialog *dialog,
   explanation = _(Enter the command you want to trigger with a 
shortcut.);
   explanation_markup = g_strdup_printf (i%s/i, explanation);
   gtk_label_set_markup (GTK_LABEL (label), explanation_markup);
-  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG 
(dialog))),
-  label, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (content_box), label, FALSE, FALSE, 0);
   gtk_widget_show (label);
 }
 
@@ -141,7 +155,7 @@ command_dialog_create_contents (CommandDialog *dialog,
   gtk_table_set_row_spacings (GTK_TABLE (table), 6);
   gtk_table_set_col_spacings (GTK_TABLE (table), 12);
   gtk_container_set_border_width (GTK_CONTAINER (table), 6);
-  gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)-vbox), table);
+  gtk_container_add (GTK_CONTAINER (content_box), table);
   gtk_widget_show (table);
 
   if (shortcut)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Revert Keep the shortcut dialog above other windows.

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to 5e1aedff6e3b9b84429d38db4f0558d423cf7d08 (commit)
   from 276875f5f784894b1c75c1b7dd93b599a6235a4c (commit)

commit 5e1aedff6e3b9b84429d38db4f0558d423cf7d08
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 23:03:56 2012 +0100

Revert Keep the shortcut dialog above other windows.

This reverts commit a04edfc41ab2035383793ca8315e2e61351108c2.

Error and conflict dialogs are kept under the grab dialog which makes
them unusable.

 dialogs/keyboard-settings/xfce-keyboard-settings.c |   11 ---
 1 file changed, 11 deletions(-)

diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c 
b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index fd8b70e..917e35e 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -678,12 +678,6 @@ xfce_keyboard_settings_edit_shortcut (XfceKeyboardSettings 
*settings,
   /* Request a new shortcut from the user */
   dialog = xfce_shortcut_dialog_new (commands, command, command);
   g_signal_connect (dialog, validate-shortcut, G_CALLBACK 
(xfce_keyboard_settings_validate_shortcut), settings);
-
-  /* Try to keep the window above as it grabs the keyboard, we don't
-   * want users to wonder why the keyboard does not work in another
-   * window */
-  gtk_window_set_keep_above (GTK_WINDOW (dialog), TRUE);
-
   response = xfce_shortcut_dialog_run (XFCE_SHORTCUT_DIALOG (dialog), 
gtk_widget_get_toplevel (GTK_WIDGET (tree_view)));
 
   if (G_LIKELY (response == GTK_RESPONSE_OK))
@@ -1008,11 +1002,6 @@ xfce_keyboard_settings_add_button_clicked 
(XfceKeyboardSettings *settings,
   shortcut_dialog = xfce_shortcut_dialog_new (commands, command, 
command);
   g_signal_connect (shortcut_dialog, validate-shortcut, G_CALLBACK 
(xfce_keyboard_settings_validate_shortcut), settings);
 
-  /* Try to keep the window above as it grabs the keyboard, we don't
-   * want users to wonder why the keyboard does not work in another
-   * window */
-  gtk_window_set_keep_above (GTK_WINDOW (shortcut_dialog), TRUE);
-
   /* Run shortcut dialog until a valid shortcut is entered or the dialog 
is cancelled */
   parent = gtk_builder_get_object (GTK_BUILDER (settings), 
keyboard-shortcuts-dialog);
   response = xfce_shortcut_dialog_run (XFCE_SHORTCUT_DIALOG 
(shortcut_dialog), GTK_WIDGET (parent));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-settings:bluesabre/display-settings Revert Keep the shortcut dialog above other windows.

2013-12-09 Thread Jérôme Guelfucci
Updating branch refs/heads/bluesabre/display-settings
 to e100731d07a5e4b3acb33c7060b6daf9b624c416 (commit)
   from 77342010611fbc0f3c5766ec7a6c016c1b8909a2 (commit)

commit e100731d07a5e4b3acb33c7060b6daf9b624c416
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 23 14:13:46 2012 +0100

Revert Keep the shortcut dialog above other windows.

This reverts commit a04edfc41ab2035383793ca8315e2e61351108c2.

 dialogs/keyboard-settings/xfce-keyboard-settings.c |   11 ---
 1 file changed, 11 deletions(-)

diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c 
b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index 34ae50e..5e7a01d 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -662,12 +662,6 @@ xfce_keyboard_settings_edit_shortcut (XfceKeyboardSettings 
*settings,
   /* Request a new shortcut from the user */
   dialog = xfce_shortcut_dialog_new (commands, command, command);
   g_signal_connect (dialog, validate-shortcut, G_CALLBACK 
(xfce_keyboard_settings_validate_shortcut), settings);
-
-  /* Try to keep the window above as it grabs the keyboard, we don't
-   * want users to wonder why the keyboard does not work in another
-   * window */
-  gtk_window_set_keep_above (GTK_WINDOW (dialog), TRUE);
-
   response = xfce_shortcut_dialog_run (XFCE_SHORTCUT_DIALOG (dialog), 
gtk_widget_get_toplevel (GTK_WIDGET (tree_view)));
 
   if (G_LIKELY (response == GTK_RESPONSE_OK))
@@ -980,11 +974,6 @@ xfce_keyboard_settings_add_button_clicked 
(XfceKeyboardSettings *settings,
   shortcut_dialog = xfce_shortcut_dialog_new (commands, command, 
command);
   g_signal_connect (shortcut_dialog, validate-shortcut, G_CALLBACK 
(xfce_keyboard_settings_validate_shortcut), settings);
 
-  /* Try to keep the window above as it grabs the keyboard, we don't
-   * want users to wonder why the keyboard does not work in another
-   * window */
-  gtk_window_set_keep_above (GTK_WINDOW (shortcut_dialog), TRUE);
-
   /* Run shortcut dialog until a valid shortcut is entered or the dialog 
is cancelled */
   parent = gtk_builder_get_object (GTK_BUILDER (settings), 
keyboard-shortcuts-dialog);
   response = xfce_shortcut_dialog_run (XFCE_SHORTCUT_DIALOG 
(shortcut_dialog), GTK_WIDGET (parent));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Fix grammatical error.

2013-10-27 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 8b9eb8b9a94fa5443ae14484b878aca3287be152 (commit)
   from 289c46e3723c17a54f7b26306efa651c2be0b36f (commit)

commit 8b9eb8b9a94fa5443ae14484b878aca3287be152
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Oct 27 17:18:44 2013 +0100

Fix grammatical error.

 xfce4-notifyd-config/main.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xfce4-notifyd-config/main.c b/xfce4-notifyd-config/main.c
index b0f6d26..5977749 100644
--- a/xfce4-notifyd-config/main.c
+++ b/xfce4-notifyd-config/main.c
@@ -55,7 +55,7 @@ xfce_notifyd_config_show_notification_preview(GtkWindow 
*parent_window)
 
 notification =
 notify_notification_new(_(Notification Preview),
-_(This is how notifications will look like),
+_(This is what notifications will look like),
 xfce4-notifyd);
 
 notify_notification_add_action(notification,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Fix build: don't mix code and declarations.

2013-09-21 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 6b8af8b62e684b4c75c6f1317e949bbe999cfa6d (commit)
   from 9b814e99d10791d672c48c49216b322bd1b3a3fc (commit)

commit 6b8af8b62e684b4c75c6f1317e949bbe999cfa6d
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Sep 21 11:15:08 2013 +0200

Fix build: don't mix code and declarations.

 xfce4-notifyd/xfce-notify-window.c |   17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index 6c820e2..f8ffdf6 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -626,11 +626,11 @@ xfce_notify_window_configure_event(GtkWidget *widget,
 static gboolean
 xfce_notify_window_expire_timeout(gpointer data)
 {
-g_return_val_if_fail(XFCE_IS_NOTIFY_WINDOW(data), FALSE);
-
 XfceNotifyWindow *window = data;
 gboolean  fade_transparent;
 
+g_return_val_if_fail(XFCE_IS_NOTIFY_WINDOW(data), FALSE);
+
 window-expire_id = 0;
 
 fade_transparent =
@@ -652,11 +652,12 @@ xfce_notify_window_expire_timeout(gpointer data)
 static gboolean
 xfce_notify_window_fade_timeout(gpointer data)
 {
-g_return_val_if_fail(XFCE_IS_NOTIFY_WINDOW(data), FALSE);
-
 XfceNotifyWindow *window = data;
-gdouble op = gtk_window_get_opacity(GTK_WINDOW(window));
+gdouble op;
 
+g_return_val_if_fail(XFCE_IS_NOTIFY_WINDOW(data), FALSE);
+
+op = gtk_window_get_opacity(GTK_WINDOW(window));
 op -= window-op_change_delta;
 if(op  0.0)
 op = 0.0;
@@ -677,10 +678,12 @@ static void
 xfce_notify_window_button_clicked(GtkWidget *widget,
   gpointer user_data)
 {
+XfceNotifyWindow *window;
+gchar *action_id;
+
 g_return_if_fail(XFCE_IS_NOTIFY_WINDOW(user_data));
 
-XfceNotifyWindow *window = XFCE_NOTIFY_WINDOW(user_data);
-gchar *action_id;
+window = XFCE_NOTIFY_WINDOW(user_data);
 
 action_id = g_object_get_data(G_OBJECT(widget), --action-id);
 g_assert(action_id);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Added type checks to prevent crashes.

2013-09-21 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 9b814e99d10791d672c48c49216b322bd1b3a3fc (commit)
   from 699cba5558b1a6b4f3d5b4c83d5bca43f1d3798a (commit)

commit 9b814e99d10791d672c48c49216b322bd1b3a3fc
Author: Andrzej ndrwr...@gmail.com
Date:   Wed Sep 18 02:21:08 2013 +0100

Added type checks to prevent crashes.

 xfce4-notifyd/xfce-notify-window.c |6 ++
 1 file changed, 6 insertions(+)

diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index 285a70e..6c820e2 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -626,6 +626,8 @@ xfce_notify_window_configure_event(GtkWidget *widget,
 static gboolean
 xfce_notify_window_expire_timeout(gpointer data)
 {
+g_return_val_if_fail(XFCE_IS_NOTIFY_WINDOW(data), FALSE);
+
 XfceNotifyWindow *window = data;
 gboolean  fade_transparent;
 
@@ -650,6 +652,8 @@ xfce_notify_window_expire_timeout(gpointer data)
 static gboolean
 xfce_notify_window_fade_timeout(gpointer data)
 {
+g_return_val_if_fail(XFCE_IS_NOTIFY_WINDOW(data), FALSE);
+
 XfceNotifyWindow *window = data;
 gdouble op = gtk_window_get_opacity(GTK_WINDOW(window));
 
@@ -673,6 +677,8 @@ static void
 xfce_notify_window_button_clicked(GtkWidget *widget,
   gpointer user_data)
 {
+g_return_if_fail(XFCE_IS_NOTIFY_WINDOW(user_data));
+
 XfceNotifyWindow *window = XFCE_NOTIFY_WINDOW(user_data);
 gchar *action_id;
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mixer:master g_thread_init is deprecated.

2013-08-15 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 2afe516e9bca1e67948d3a028e1e44875296f068 (commit)
   from 045b9f3a4fa9f105355b01641d0288c88463be12 (commit)

commit 2afe516e9bca1e67948d3a028e1e44875296f068
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Aug 15 11:50:44 2013 +0200

g_thread_init is deprecated.

 xfce4-mixer/main.c |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/xfce4-mixer/main.c b/xfce4-mixer/main.c
index 0c5026c..9e8417b 100644
--- a/xfce4-mixer/main.c
+++ b/xfce4-mixer/main.c
@@ -10,12 +10,12 @@
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
 
@@ -71,7 +71,7 @@ message_received (UniqueApp *app,
 
 
 
-int 
+int
 main (intargc,
   char **argv)
 {
@@ -91,9 +91,11 @@ main (intargc,
   /* Setup translation domain */
   xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, UTF-8);
 
+#if !GLIB_CHECK_VERSION(2, 32, 0)
   /* Initialize the threading system */
   if (G_LIKELY (!g_thread_supported ()))
 g_thread_init (NULL);
+#endif
 
   /* Set application name */
   g_set_application_name (_(Audio Mixer));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-power-manager:master Fix Typo in xfpm-power.c

2013-08-11 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to b35cee55e065a7ebcbe6062cdcc5916cbe04973f (commit)
   from 6f1dfa70114cfa628e130a2fcdc402c3527e1749 (commit)

commit b35cee55e065a7ebcbe6062cdcc5916cbe04973f
Author: Benjamin Kerensa bkere...@ubuntu.com
Date:   Sun Mar 10 19:36:13 2013 -0700

Fix Typo in xfpm-power.c

 src/xfpm-power.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xfpm-power.c b/src/xfpm-power.c
index 796bef8..bcf2fbd 100644
--- a/src/xfpm-power.c
+++ b/src/xfpm-power.c
@@ -1034,7 +1034,7 @@ xfpm_power_add_device (XfpmPower *power, const gchar 
*object_path)
 }
 else if ( device_type != XFPM_DEVICE_TYPE_LINE_POWER )
 {
-   g_warning (Unable to monitor unkown power device with object_path : 
%s, object_path);
+   g_warning (Unable to monitor unknown power device with object_path : 
%s, object_path);
g_object_unref (proxy_prop);
 }
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-power-manager:master Fix typo in error message.

2013-08-11 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 3b4815eeb2b0edc7e8f24a453feddf069bbea3bc (commit)
   from b35cee55e065a7ebcbe6062cdcc5916cbe04973f (commit)

commit 3b4815eeb2b0edc7e8f24a453feddf069bbea3bc
Author: Ian ifreeca...@gmail.com
Date:   Sun Aug 11 22:34:57 2013 +0200

Fix typo in error message.

 src/xfpm-manager.c |  180 ++--
 1 file changed, 90 insertions(+), 90 deletions(-)

diff --git a/src/xfpm-manager.c b/src/xfpm-manager.c
index 472ee3e..853d78c 100644
--- a/src/xfpm-manager.c
+++ b/src/xfpm-manager.c
@@ -73,9 +73,9 @@ static gboolean xfpm_manager_quit (XfpmManager *manager);
 struct XfpmManagerPrivate
 {
 DBusGConnection *session_bus;
-
+
 XfceSMClient*client;
-
+
 XfpmPower   *power;
 XfpmButton  *button;
 XfpmXfconf  *conf;
@@ -90,7 +90,7 @@ struct XfpmManagerPrivate
 #endif
 
 GTimer *timer;
-
+
 gbooleaninhibited;
 gbooleansession_managed;
 };
@@ -113,7 +113,7 @@ xfpm_manager_init (XfpmManager *manager)
 manager-priv = XFPM_MANAGER_GET_PRIVATE (manager);
 
 manager-priv-timer = g_timer_new ();
-
+
 notify_init (xfce4-power-manager);
 }
 
@@ -126,7 +126,7 @@ xfpm_manager_finalize (GObject *object)
 
 if ( manager-priv-session_bus )
dbus_g_connection_unref (manager-priv-session_bus);
-   
+
 g_object_unref (manager-priv-power);
 g_object_unref (manager-priv-button);
 g_object_unref (manager-priv-conf);
@@ -136,15 +136,15 @@ xfpm_manager_finalize (GObject *object)
 g_object_unref (manager-priv-disks);
 g_object_unref (manager-priv-inhibit);
 g_object_unref (manager-priv-idle);
-
+
 g_timer_destroy (manager-priv-timer);
-
+
 #ifdef HAVE_DPMS
 g_object_unref (manager-priv-dpms);
 #endif
-
+
 g_object_unref (manager-priv-backlight);
-   
+
 G_OBJECT_CLASS (xfpm_manager_parent_class)-finalize (object);
 }
 
@@ -162,7 +162,7 @@ static gboolean
 xfpm_manager_quit (XfpmManager *manager)
 {
 XFPM_DEBUG (Exiting);
-
+
 xfpm_manager_release_names (manager);
 gtk_main_quit ();
 return TRUE;
@@ -188,10 +188,10 @@ xfpm_manager_reserve_names (XfpmManager *manager)
  org.freedesktop.PowerManagement) )
 {
g_warning (Unable to reserve bus name: Maybe any already running 
instance?\n);
-   
+
g_object_unref (G_OBJECT (manager));
gtk_main_quit ();
-   
+
return FALSE;
 }
 return TRUE;
@@ -202,7 +202,7 @@ xfpm_manager_shutdown (XfpmManager *manager)
 {
 GError *error = NULL;
 xfpm_console_kit_shutdown (manager-priv-console, error );
-
+
 if ( error )
 {
g_warning (Failed to shutdown the system : %s, error-message);
@@ -255,12 +255,12 @@ static void
 xfpm_manager_button_pressed_cb (XfpmButton *bt, XfpmButtonKey type, 
XfpmManager *manager)
 {
 XfpmShutdownRequest req = XFPM_DO_NOTHING;
-
+
 XFPM_DEBUG_ENUM (type, XFPM_TYPE_BUTTON_KEY, Received button press 
event);
-  
+
 if ( type == BUTTON_MON_BRIGHTNESS_DOWN || type == 
BUTTON_MON_BRIGHTNESS_UP )
 return;
-   
+
 if ( type == BUTTON_POWER_OFF )
 {
 g_object_get (G_OBJECT (manager-priv-conf),
@@ -285,7 +285,7 @@ xfpm_manager_button_pressed_cb (XfpmButton *bt, 
XfpmButtonKey type, XfpmManager
 }
 
 XFPM_DEBUG_ENUM (req, XFPM_TYPE_SHUTDOWN_REQUEST, Shutdown request : );
-
+
 if ( req == XFPM_ASK )
xfpm_manager_ask_shutdown (manager);
 else
@@ -303,11 +303,11 @@ xfpm_manager_lid_changed_cb (XfpmPower *power, gboolean 
lid_is_closed, XfpmManag
 {
 XfpmLidTriggerAction action;
 gboolean on_battery;
-
+
 g_object_get (G_OBJECT (power),
  on-battery, on_battery,
  NULL);
-
+
 g_object_get (G_OBJECT (manager-priv-conf),
  on_battery ? LID_SWITCH_ON_BATTERY_CFG : 
LID_SWITCH_ON_AC_CFG, action,
  NULL);
@@ -315,7 +315,7 @@ xfpm_manager_lid_changed_cb (XfpmPower *power, gboolean 
lid_is_closed, XfpmManag
 if ( lid_is_closed )
 {
XFPM_DEBUG_ENUM (action, XFPM_TYPE_LID_TRIGGER_ACTION, LID close 
event);
-   
+
if ( action == LID_TRIGGER_NOTHING )
{
 #ifdef HAVE_DPMS
@@ -328,16 +328,16 @@ xfpm_manager_lid_changed_cb (XfpmPower *power, gboolean 
lid_is_closed, XfpmManag
if ( !xfpm_is_multihead_connected () )
xfpm_lock_screen ();
}
-   else 
+   else
{
/*
 * Force sleep here as lid is closed and no point of asking the
 * user for confirmation in case of an application is inhibiting
-* the power manager. 
+* the power manager.
 */
xfpm_manager_sleep_request (manager, action, TRUE);
}
-   
+
 }
 else
 {
@@ -359,34 +359,34 @@ xfpm_manager_alarm_timeout_cb (EggIdletime 

[Xfce4-commits] xfce4-power-manager:master Fix typo.

2013-08-11 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to d7252850d8070a0d8247d4af9d8930014f2a423b (commit)
   from 3b4815eeb2b0edc7e8f24a453feddf069bbea3bc (commit)

commit d7252850d8070a0d8247d4af9d8930014f2a423b
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Aug 11 22:40:11 2013 +0200

Fix typo.

 src/xfpm-battery.c |  252 ++--
 1 file changed, 126 insertions(+), 126 deletions(-)

diff --git a/src/xfpm-battery.c b/src/xfpm-battery.c
index 34a1da1..b3690d2 100644
--- a/src/xfpm-battery.c
+++ b/src/xfpm-battery.c
@@ -55,9 +55,9 @@ struct XfpmBatteryPrivate
 XfpmButton *button;
 DBusGProxy *proxy;
 DBusGProxy*proxy_prop;
-
+
 gchar *icon_prefix;
-
+
 XfpmBatteryCharge   charge;
 XfpmDeviceState state;
 XfpmDeviceType  type;
@@ -68,10 +68,10 @@ struct XfpmBatteryPrivate
 gint64 time_to_empty;
 
 const gchar*battery_name;
-
+
 gulong sig;
 gulong sig_bt;
-
+
 guint   notify_idle;
 };
 
@@ -82,7 +82,7 @@ enum
 PROP_CHARGE_STATUS,
 PROP_DEVICE_TYPE
 };
-
+
 enum
 {
 BATTERY_CHARGE_CHANGED,
@@ -96,27 +96,27 @@ G_DEFINE_TYPE (XfpmBattery, xfpm_battery, 
GTK_TYPE_STATUS_ICON)
 static const gchar * G_GNUC_CONST
 xfpm_battery_get_icon_index (XfpmDeviceType type, guint percent)
 {
-if (percent  10) 
+if (percent  10)
 {
 return 000;
-} 
-else if (percent  30) 
+}
+else if (percent  30)
 {
 return ( (type == XFPM_DEVICE_TYPE_BATTERY || type == 
XFPM_DEVICE_TYPE_UPS) ? 020 : 030);
-} 
-else if (percent  50) 
+}
+else if (percent  50)
 {
 return ( (type == XFPM_DEVICE_TYPE_BATTERY || type == 
XFPM_DEVICE_TYPE_UPS ) ? 040 : 030);
-} 
-else if (percent  70) 
+}
+else if (percent  70)
 {
 return 060;
-} 
-else if (percent  90) 
+}
+else if (percent  90)
 {
 return ((type == XFPM_DEVICE_TYPE_BATTERY || type == 
XFPM_DEVICE_TYPE_UPS) ? 080 : 060);
 }
-
+
 return 100;
 }
 
@@ -125,11 +125,11 @@ xfpm_battery_refresh_visible (XfpmBattery *battery)
 {
 XfpmShowIcon show_icon;
 gboolean visible = TRUE;
-
+
 g_object_get (G_OBJECT (battery-priv-conf),
  SHOW_TRAY_ICON_CFG, show_icon,
  NULL);
- 
+
 if ( show_icon == SHOW_ICON_ALWAYS )
visible = TRUE;
 else if ( show_icon == NEVER_SHOW_ICON )
@@ -148,7 +148,7 @@ xfpm_battery_refresh_visible (XfpmBattery *battery)
 }
 
 XFPM_DEBUG_ENUM (show_icon, XFPM_TYPE_SHOW_ICON, visible=%s, 
xfpm_bool_to_string (visible));
- 
+
 gtk_status_icon_set_visible (GTK_STATUS_ICON (battery), visible);
 }
 
@@ -166,13 +166,13 @@ xfpm_battery_get_time_string (guint seconds)
 /* Add 0.5 to do rounding */
 minutes = (int) ( ( seconds / 60.0 ) + 0.5 );
 
-if (minutes == 0) 
+if (minutes == 0)
 {
timestring = g_strdup (_(Unknown time));
return timestring;
 }
 
-if (minutes  60) 
+if (minutes  60)
 {
timestring = g_strdup_printf (ngettext (%i minute,
  %i minutes,
@@ -201,8 +201,8 @@ static gchar *
 xfpm_battery_get_message_from_battery_state (XfpmBattery *battery)
 {
 gchar *msg  = NULL;
-
-
+
+
 if (battery-priv-type == XFPM_DEVICE_TYPE_BATTERY || battery-priv-type 
== XFPM_DEVICE_TYPE_UPS)
 {
switch (battery-priv-state)
@@ -212,16 +212,16 @@ xfpm_battery_get_message_from_battery_state (XfpmBattery 
*battery)
break;
case XFPM_DEVICE_STATE_CHARGING:
msg = g_strdup_printf (_(Your %s is charging), 
battery-priv-battery_name);
-   
+
if ( battery-priv-time_to_full != 0 )
{
gchar *tmp, *est_time_str;
tmp = g_strdup (msg);
g_free (msg);
-   
+
est_time_str = xfpm_battery_get_time_string 
(battery-priv-time_to_full);
-   
-   msg = g_strdup_printf (_(%s (%i%%)\n%s until is fully 
charged.), tmp, battery-priv-percentage, est_time_str);
+
+   msg = g_strdup_printf (_(%s (%i%%)\n%s until it is fully 
charged.), tmp, battery-priv-percentage, est_time_str);
g_free (est_time_str);
g_free (tmp);
}
@@ -232,15 +232,15 @@ xfpm_battery_get_message_from_battery_state (XfpmBattery 
*battery)
msg =  g_strdup_printf (_(Your %s is discharging), 
battery-priv-battery_name);
else
msg =  g_strdup_printf (_(System is running on %s power), 
battery-priv-battery_name);
-   
+
if ( battery-priv

[Xfce4-commits] xfce4-notifyd:master Autogenerate ChangeLog on release.

2013-05-08 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to afa4baaa880ede57546535f35c0a3cb89d096b6b (commit)
   from 7265d36643d238b7f947c6ef2126dd3d46390cd0 (commit)

commit afa4baaa880ede57546535f35c0a3cb89d096b6b
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed May 8 14:12:08 2013 +0200

Autogenerate ChangeLog on release.

 Makefile.am |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 0d47598..df81bea 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -254,6 +254,15 @@ release: gpg-sign
mv $(PACKAGE)-$(VERSION).tar.bz2* releases/
-rm $(PACKAGE)-$(VERSION).tar.gz
 
+.PHONY: ChangeLog
+
+ChangeLog: Makefile
+   (GIT_DIR=$(top_srcdir)/.git git log  .changelog.tmp \
+mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) \
+   || (touch ChangeLog; echo 'Git directory not found: installing possibly 
empty changelog.' 2)
+
+dist-hook: ChangeLog
+
 #Tests
 noinst_PROGRAMS = \
tests/test-text \
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd|xfce4-notifyd-0.2.4 Creating annotated tag xfce4-notifyd-0.2.4

2013-05-08 Thread Jérôme Guelfucci
Updating annotated tag refs/tags/xfce4-notifyd-0.2.4
 as new annotated tag
 to bdf9a16f3873bba00c1916a11f5d1d4c1e60e976 (tag)
   succeeds xfce4-notifyd-0.2.3-9-gafa4baa
  tagged by Jérôme Guelfucci jero...@xfce.org
 on 2013-05-08 14:16 +0200

Jérôme Guelfucci (1):
  Get ready for 0.2.4.

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:xfce-4.10 Pass event group when translating keyboard state.

2013-05-04 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 8cf0074f0a8ee650fd675d921ac3a298cde1aa39 (commit)
   from 71d702a2329b1182b606db7fed0ef262dfcdc0ea (commit)

commit 8cf0074f0a8ee650fd675d921ac3a298cde1aa39
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Tue Dec 18 08:04:16 2012 +0100

Pass event group when translating keyboard state.

 libxfce4kbd-private/xfce-shortcut-dialog.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c 
b/libxfce4kbd-private/xfce-shortcut-dialog.c
index 5f1b058..b637840 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -323,7 +323,7 @@ xfce_shortcut_dialog_key_pressed (XfceShortcutDialog 
*dialog,
   modifiers = event-state;
 
   gdk_keymap_translate_keyboard_state (keymap, event-hardware_keycode,
-   modifiers, 0,
+   modifiers, event-group,
keyval, NULL, NULL, consumed);
 
   /* Get the modifiers */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:xfce-4.10 Improve key comparison.

2013-05-04 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 9acd5517605cddfa3484b83b8fb119d9c8a032a5 (commit)
   from 8cf0074f0a8ee650fd675d921ac3a298cde1aa39 (commit)

commit 9acd5517605cddfa3484b83b8fb119d9c8a032a5
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Tue Dec 18 08:21:03 2012 +0100

Improve key comparison.

Remove horrible hardcoded hack and use the recommanded way of comparison
described in the GDK documentation instead.

 libxfce4kbd-private/xfce-shortcuts-grabber.c |   27 -
 1 files changed, 5 insertions(+), 22 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c 
b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index 9faec07..120cc03 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -429,6 +429,7 @@ struct EventKeyFindContext
 {
   XfceShortcutsGrabber *grabber;
   GdkModifierType   modifiers;
+  GdkModifierType   consumed;
   guint keyval;
   const gchar  *result;
 };
@@ -440,30 +441,13 @@ find_event_key (const gchar*shortcut,
 XfceKey*key,
 struct EventKeyFindContext *context)
 {
-  GdkModifierType ignored;
-
   g_return_val_if_fail (context != NULL, FALSE);
 
   TRACE (Comparing to %s, shortcut);
 
-  ignored = 0;
-
-  /* Accept MOD1 + META as MOD1 */
-  if (key-modifiers  context-modifiers  GDK_MOD1_MASK)
-{
-  TRACE (Ignoring Meta Mask);
-  ignored |= GDK_META_MASK;
-}
-
-  /* Accept SUPER + HYPER as SUPER */
-  if (key-modifiers  context-modifiers  GDK_SUPER_MASK)
-{
-  TRACE (Ignoring Hyper Mask);
-  ignored |= GDK_HYPER_MASK;
-}
-
-  if ((key-modifiers  ~ignored) == (context-modifiers  ~ignored)
-   key-keyval == context-keyval)
+  if ((key-modifiers  ~context-consumed  (GDK_CONTROL_MASK | 
GDK_SHIFT_MASK | GDK_MOD1_MASK))
+  == (context-modifiers)
+   (key-keyval == context-keyval))
 {
   context-result = shortcut;
 
@@ -511,13 +495,12 @@ xfce_shortcuts_grabber_event_filter (GdkXEvent
*gdk_xevent,
XkbGroupForCoreState 
(xevent-xkey.state),
keyval, NULL, NULL, consumed);
 
-  /* Get the modifiers */
   modifiers = ~consumed;
-  gdk_keymap_add_virtual_modifiers (keymap, modifiers);
   modifiers = mod_mask;
 
   context.keyval = keyval;
   context.modifiers = modifiers;
+  context.consumed = consumed;
 
   raw_shortcut_name = gtk_accelerator_name (keyval, modifiers);
   TRACE (Looking for %s, raw_shortcut_name);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:xfce-4.10 Fix keyboard shortcuts with Shift modifier (bug #8744).

2013-05-04 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 9b7bd5473a0057deeaba8016c8497a9cdc0fd53b (commit)
   from 9acd5517605cddfa3484b83b8fb119d9c8a032a5 (commit)

commit 9b7bd5473a0057deeaba8016c8497a9cdc0fd53b
Author: Harald Judt h.j...@gmx.at
Date:   Tue Dec 18 09:00:44 2012 +0100

Fix keyboard shortcuts with Shift modifier (bug #8744).

 libxfce4kbd-private/xfce-shortcut-dialog.c   |8 
 libxfce4kbd-private/xfce-shortcuts-grabber.c |   12 +++-
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c 
b/libxfce4kbd-private/xfce-shortcut-dialog.c
index b637840..feb7a21 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -327,6 +327,14 @@ xfce_shortcut_dialog_key_pressed (XfceShortcutDialog 
*dialog,
keyval, NULL, NULL, consumed);
 
   /* Get the modifiers */
+
+  /* If Shift was used when translating the keyboard state, we remove it
+   * from the consumed bit because gtk_accelerator_{name,parse} fail to
+   * handle this correctly. This allows us to have shortcuts with Shift
+   * as a modifier key (see bug #8744). */
+  if ((modifiers  GDK_SHIFT_MASK)  (consumed  GDK_SHIFT_MASK))
+consumed = ~GDK_SHIFT_MASK;
+
   modifiers = ~consumed;
   modifiers = mod_mask;
 
diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c 
b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index 120cc03..a5801d3 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -313,7 +313,7 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
 TRACE (Ungrabbing %s, shortcut_name);
 
   TRACE (Keyval: %d, key-keyval);
-  TRACE (Modifiers: 0x%x, key-modifiers);
+  TRACE (Modifiers: 0x%x, modifiers);
 
   g_free (shortcut_name);
 
@@ -495,6 +495,15 @@ xfce_shortcuts_grabber_event_filter (GdkXEvent
*gdk_xevent,
XkbGroupForCoreState 
(xevent-xkey.state),
keyval, NULL, NULL, consumed);
 
+  /* Get the modifiers */
+
+  /* If Shift was used when translating the keyboard state, we remove it
+   * from the consumed bit because gtk_accelerator_{name,parse} fail to
+   * handle this correctly. This allows us to have shortcuts with Shift
+   * as a modifier key (see bug #8744). */
+  if ((modifiers  GDK_SHIFT_MASK)  (consumed  GDK_SHIFT_MASK))
+consumed = ~GDK_SHIFT_MASK;
+
   modifiers = ~consumed;
   modifiers = mod_mask;
 
@@ -503,6 +512,7 @@ xfce_shortcuts_grabber_event_filter (GdkXEvent
*gdk_xevent,
   context.consumed = consumed;
 
   raw_shortcut_name = gtk_accelerator_name (keyval, modifiers);
+  gtk_accelerator_parse (raw_shortcut_name, context.keyval, 
context.modifiers);
   TRACE (Looking for %s, raw_shortcut_name);
   g_free (raw_shortcut_name);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:xfce-4.10 No need to remove consumed modifiers twice.

2013-05-04 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 8733e8a022c3c9c700dbd9cabfb39051ae6fbf81 (commit)
   from 9b7bd5473a0057deeaba8016c8497a9cdc0fd53b (commit)

commit 8733e8a022c3c9c700dbd9cabfb39051ae6fbf81
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Tue Dec 18 09:03:38 2012 +0100

No need to remove consumed modifiers twice.

 libxfce4kbd-private/xfce-shortcuts-grabber.c |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c 
b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index a5801d3..1a9bccf 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -429,7 +429,6 @@ struct EventKeyFindContext
 {
   XfceShortcutsGrabber *grabber;
   GdkModifierType   modifiers;
-  GdkModifierType   consumed;
   guint keyval;
   const gchar  *result;
 };
@@ -445,7 +444,7 @@ find_event_key (const gchar*shortcut,
 
   TRACE (Comparing to %s, shortcut);
 
-  if ((key-modifiers  ~context-consumed  (GDK_CONTROL_MASK | 
GDK_SHIFT_MASK | GDK_MOD1_MASK))
+  if ((key-modifiers  (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK))
   == (context-modifiers)
(key-keyval == context-keyval))
 {
@@ -509,7 +508,6 @@ xfce_shortcuts_grabber_event_filter (GdkXEvent
*gdk_xevent,
 
   context.keyval = keyval;
   context.modifiers = modifiers;
-  context.consumed = consumed;
 
   raw_shortcut_name = gtk_accelerator_name (keyval, modifiers);
   gtk_accelerator_parse (raw_shortcut_name, context.keyval, 
context.modifiers);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:xfce-4.10 Fix alt + print being detected as SysReq (bug #7897).

2013-05-04 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 06ca1a8bf92cb6d7656dc28a1711b91bfac1080f (commit)
   from 8733e8a022c3c9c700dbd9cabfb39051ae6fbf81 (commit)

commit 06ca1a8bf92cb6d7656dc28a1711b91bfac1080f
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Tue Dec 18 10:00:42 2012 +0100

Fix alt + print being detected as SysReq (bug #7897).

If we were able to grab it, it means that this combination is not used
as SysReq, users should then be able to use that.

Note that this won't work by default on most distributions because the
SysReq key is enabled and X won't pass the event. You need to disable the
SysReq key, for example by setting kernel.sysrq = 0 in /etc/sysctl.conf.

 libxfce4kbd-private/xfce-shortcut-dialog.c   |7 +++
 libxfce4kbd-private/xfce-shortcuts-grabber.c |7 +++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c 
b/libxfce4kbd-private/xfce-shortcut-dialog.c
index feb7a21..2052bf0 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -326,6 +326,13 @@ xfce_shortcut_dialog_key_pressed (XfceShortcutDialog 
*dialog,
modifiers, event-group,
keyval, NULL, NULL, consumed);
 
+  /* We want Alt + Print to be Alt + Print not SysReq. See bug #7897 */
+  if (keyval == GDK_KEY_Sys_Req  (modifiers  GDK_MOD1_MASK) != 0)
+{
+  consumed = 0;
+  keyval = GDK_KEY_Print;
+}
+
   /* Get the modifiers */
 
   /* If Shift was used when translating the keyboard state, we remove it
diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c 
b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index 1a9bccf..0118a70 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -494,6 +494,13 @@ xfce_shortcuts_grabber_event_filter (GdkXEvent
*gdk_xevent,
XkbGroupForCoreState 
(xevent-xkey.state),
keyval, NULL, NULL, consumed);
 
+  /* We want Alt + Print to be Alt + Print not SysReq. See bug #7897 */
+  if (keyval == GDK_KEY_Sys_Req  (modifiers  GDK_MOD1_MASK) != 0)
+{
+  consumed = 0;
+  keyval = GDK_KEY_Print;
+}
+
   /* Get the modifiers */
 
   /* If Shift was used when translating the keyboard state, we remove it
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:xfce-4.10 Use Primary instead of Control (bug #8200).

2013-05-04 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to c760cb5474c4cea89e923587df68cc3c4767f676 (commit)
   from 06ca1a8bf92cb6d7656dc28a1711b91bfac1080f (commit)

commit c760cb5474c4cea89e923587df68cc3c4767f676
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 14:56:06 2012 +0100

Use Primary instead of Control (bug #8200).

While Control works fine now for grabbing / detecting, shortcut
comparison is broken because the strings are different.

This only deals with the default shortcuts, we need to migrate the
custom shortcuts.

 libxfce4kbd-private/xfce4-keyboard-shortcuts.xml |   66 +++---
 1 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/libxfce4kbd-private/xfce4-keyboard-shortcuts.xml 
b/libxfce4kbd-private/xfce4-keyboard-shortcuts.xml
index cf1978d..2b1507e 100644
--- a/libxfce4kbd-private/xfce4-keyboard-shortcuts.xml
+++ b/libxfce4kbd-private/xfce4-keyboard-shortcuts.xml
@@ -10,10 +10,10 @@
   property name=lt;Altgt;F3 type=string value=xfce4-appfinder
 property name=startup-notify type=bool value=true/
   /property
-  property name=lt;Controlgt;lt;Altgt;Delete type=string 
value=xflock4/
+  property name=lt;Primarygt;lt;Altgt;Delete type=string 
value=xflock4/
   property name=XF86Display type=string value=xfce4-display-settings 
--minimal/
   property name=lt;Supergt;p type=string 
value=xfce4-display-settings --minimal/
-  property name=lt;Controlgt;Escape type=string value=xfdesktop 
--menu/
+  property name=lt;Primarygt;Escape type=string value=xfdesktop 
--menu/
   property name=XF86WWW type=string value=exo-open --launch 
WebBrowser/
   property name=XF86Mail type=string value=exo-open --launch 
MailReader/
 /property
@@ -29,8 +29,8 @@
   property name=lt;Altgt;Tab type=string value=cycle_windows_key/
   property name=lt;Altgt;lt;Shiftgt;Tab type=string 
value=cycle_reverse_windows_key/
   property name=lt;Altgt;Delete type=string 
value=del_workspace_key/
-  property name=lt;Controlgt;lt;Altgt;Down type=string 
value=down_workspace_key/
-  property name=lt;Controlgt;lt;Altgt;Left type=string 
value=left_workspace_key/
+  property name=lt;Primarygt;lt;Altgt;Down type=string 
value=down_workspace_key/
+  property name=lt;Primarygt;lt;Altgt;Left type=string 
value=left_workspace_key/
   property name=lt;Shiftgt;lt;Altgt;Page_Down type=string 
value=lower_window_key/
   property name=lt;Altgt;F4 type=string value=close_window_key/
   property name=lt;Altgt;F6 type=string value=stick_window_key/
@@ -40,38 +40,38 @@
   property name=lt;Altgt;F10 type=string 
value=maximize_window_key/
   property name=lt;Altgt;F11 type=string value=fullscreen_key/
   property name=lt;Altgt;F12 type=string value=above_key/
-  property name=lt;Controlgt;lt;Shiftgt;lt;Altgt;Left 
type=string value=move_window_left_key/
-  property name=lt;Altgt;lt;Controlgt;End type=string 
value=move_window_next_workspace_key/
-  property name=lt;Altgt;lt;Controlgt;Home type=string 
value=move_window_prev_workspace_key/
-  property name=lt;Controlgt;lt;Shiftgt;lt;Altgt;Right 
type=string value=move_window_right_key/
-  property name=lt;Controlgt;lt;Shiftgt;lt;Altgt;Up type=string 
value=move_window_up_key/
-  property name=lt;Altgt;lt;Controlgt;KP_1 type=string 
value=move_window_workspace_1_key/
-  property name=lt;Altgt;lt;Controlgt;KP_2 type=string 
value=move_window_workspace_2_key/
-  property name=lt;Altgt;lt;Controlgt;KP_3 type=string 
value=move_window_workspace_3_key/
-  property name=lt;Altgt;lt;Controlgt;KP_4 type=string 
value=move_window_workspace_4_key/
-  property name=lt;Altgt;lt;Controlgt;KP_5 type=string 
value=move_window_workspace_5_key/
-  property name=lt;Altgt;lt;Controlgt;KP_6 type=string 
value=move_window_workspace_6_key/
-  property name=lt;Altgt;lt;Controlgt;KP_7 type=string 
value=move_window_workspace_7_key/
-  property name=lt;Altgt;lt;Controlgt;KP_8 type=string 
value=move_window_workspace_8_key/
-  property name=lt;Altgt;lt;Controlgt;KP_9 type=string 
value=move_window_workspace_9_key/
+  property name=lt;Primarygt;lt;Shiftgt;lt;Altgt;Left 
type=string value=move_window_left_key/
+  property name=lt;Altgt;lt;Primarygt;End type=string 
value=move_window_next_workspace_key/
+  property name=lt;Altgt;lt;Primarygt;Home type=string 
value=move_window_prev_workspace_key/
+  property name=lt;Primarygt;lt;Shiftgt;lt;Altgt;Right 
type=string value=move_window_right_key/
+  property name=lt;Primarygt;lt;Shiftgt;lt;Altgt;Up type=string 
value=move_window_up_key/
+  property name=lt;Altgt;lt;Primarygt;KP_1 type=string 
value=move_window_workspace_1_key/
+  property name=lt;Altgt;lt;Primarygt;KP_2 type=string 
value=move_window_workspace_2_key/
+  property name=lt;Altgt;lt;Primarygt;KP_3 type=string 
value=move_window_workspace_3_key/
+  property name

[Xfce4-commits] libxfce4ui:xfce-4.10 Fix keyboard shortcuts with keypad (bug #4178).

2013-05-04 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 202442c762894e2eabfc9e8953a64674a6a2b6f7 (commit)
   from a43f8e098cbef25ea0fd042c64e367aedf205397 (commit)

commit 202442c762894e2eabfc9e8953a64674a6a2b6f7
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 10:34:23 2012 +0100

Fix keyboard shortcuts with keypad (bug #4178).

To do so, we also grab all shortcuts with the numlock modifier.

 libxfce4kbd-private/xfce-shortcuts-grabber.c |   11 +++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c 
b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index 9b0947c..5728dda 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -276,6 +276,10 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
   return;
 }
 
+  numlock_modifier =
+XkbKeysymToModifiers (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
+ GDK_KEY_Num_Lock);
+
   for (i = 0; i  n_keys; i ++)
 {
   /* Grab all hardware keys generating keyval */
@@ -292,12 +296,19 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber 
*grabber,
   guint mod_masks [] = {
 0,
 GDK_MOD2_MASK,
+numlock_modifier | GDK_MOD2_MASK,
 GDK_LOCK_MASK,
+numlock_modifier | GDK_LOCK_MASK,
 GDK_MOD5_MASK,
+numlock_modifier | GDK_MOD5_MASK,
 GDK_MOD2_MASK | GDK_LOCK_MASK,
+numlock_modifier | GDK_MOD2_MASK | GDK_LOCK_MASK,
 GDK_MOD2_MASK | GDK_MOD5_MASK,
+numlock_modifier | GDK_MOD2_MASK | GDK_MOD5_MASK,
 GDK_LOCK_MASK | GDK_MOD5_MASK,
+numlock_modifier | GDK_LOCK_MASK | GDK_MOD5_MASK,
 GDK_MOD2_MASK | GDK_LOCK_MASK | GDK_MOD5_MASK,
+numlock_modifier | GDK_MOD2_MASK | GDK_LOCK_MASK | GDK_MOD5_MASK,
   };
 
   /* Retrieve the root window of the screen */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:xfce-4.10 Primary and Control now conflict.

2013-05-04 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 4561420e4a3fbe33f0e7533b5ae0592b07578695 (commit)
   from 202442c762894e2eabfc9e8953a64674a6a2b6f7 (commit)

commit 4561420e4a3fbe33f0e7533b5ae0592b07578695
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 30 10:21:29 2012 +0100

Primary and Control now conflict.

When we grab a shortcut with the Primary modifier, we also look for
conflicts with the Control equivalent as they are the same. That way we
can handle shortcuts from old configurations which were grabbed with an
older version of GTK+.

 libxfce4kbd-private/xfce-shortcuts-provider.c |   52 -
 1 files changed, 51 insertions(+), 1 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcuts-provider.c 
b/libxfce4kbd-private/xfce-shortcuts-provider.c
index 3fbf746..6ee4d7f 100644
--- a/libxfce4kbd-private/xfce-shortcuts-provider.c
+++ b/libxfce4kbd-private/xfce-shortcuts-provider.c
@@ -575,9 +575,9 @@ gboolean
 xfce_shortcuts_provider_has_shortcut (XfceShortcutsProvider *provider,
   const gchar   *shortcut)
 {
+  gboolean has_property;
   gchar   *base_property;
   gchar   *property;
-  gboolean has_property;
 
   g_return_val_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (provider), FALSE);
   g_return_val_if_fail (XFCONF_IS_CHANNEL (provider-priv-channel), FALSE);
@@ -591,6 +591,56 @@ xfce_shortcuts_provider_has_shortcut 
(XfceShortcutsProvider *provider,
   has_property = xfconf_channel_has_property (provider-priv-channel, 
property);
   g_free (property);
 
+  if (!has_property  g_strrstr (shortcut, Primary))
+{
+  /* We want to match a shortcut with Primary. Older versions of
+   * GTK+ used Control and this might be stored in Xfconf. We need
+   * to check for this too. */
+
+  const gchar *primary;
+  const gchar *p, *s;
+  GString *replaced;
+  gchar   *with_control_shortcut;
+
+  replaced = g_string_sized_new (strlen (shortcut));
+  primary = Primary;
+
+  /* Replace Primary in the string by Control using the same logic
+   * as exo_str_replace. */
+
+  while (*shortcut != '\0')
+{
+  if (G_UNLIKELY (*shortcut == *primary))
+{
+  /* compare the pattern to the current string */
+  for (p = primary + 1, s = shortcut + 1; *p == *s; ++s, ++p)
+if (*p == '\0' || *s == '\0')
+  break;
+
+  /* check if the pattern fully matched */
+  if (G_LIKELY (*p == '\0'))
+{
+  g_string_append (replaced, Control);
+  shortcut = s;
+  continue;
+}
+}
+
+  g_string_append_c (replaced, *shortcut++);
+}
+
+  with_control_shortcut = g_string_free (replaced, FALSE);
+
+  DBG (Looking for old GTK+ shortcut %s, with_control_shortcut);
+
+  property =
+g_strconcat (base_property, /, with_control_shortcut, NULL);
+  has_property = xfconf_channel_has_property (provider-priv-channel, 
property);
+  g_free (property);
+
+  g_free (with_control_shortcut);
+}
+
   return has_property;
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:xfce-4.10 Don't initialize the match context values twice.

2013-05-04 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 4dba3925c2103a1320759bc003df68dbc9b0394f (commit)
   from 4561420e4a3fbe33f0e7533b5ae0592b07578695 (commit)

commit 4dba3925c2103a1320759bc003df68dbc9b0394f
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 29 14:56:50 2012 +0100

Don't initialize the match context values twice.

They are initialized to the correct values by the later
gtk_accelerator_parse call.

 libxfce4kbd-private/xfce-shortcuts-grabber.c |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c 
b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index 5728dda..f177206 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -440,17 +440,20 @@ xfce_shortcuts_grabber_event_filter (GdkXEvent
*gdk_xevent,
   modifiers = ~consumed;
   modifiers = mod_mask;
 
-  context.keyval = keyval;
-  context.modifiers = modifiers;
-
+  /* Use the keyval and modifiers values of gtk_accelerator_parse. We
+   * will compare them with values we also get from this function and as
+   * it has its own logic, it's easier and safer to do so.
+   * See bug #8744 for a live example. */
   raw_shortcut_name = gtk_accelerator_name (keyval, modifiers);
   gtk_accelerator_parse (raw_shortcut_name, context.keyval, 
context.modifiers);
+
   TRACE (Looking for %s, raw_shortcut_name);
   g_free (raw_shortcut_name);
 
   g_hash_table_foreach (grabber-priv-keys, (GHFunc) find_event_key, 
context);
 
   if (G_LIKELY (context.result != NULL))
+/* We had a positive match */
 g_signal_emit_by_name (grabber, shortcut-activated,
context.result, timestamp);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:xfce-4.10 Don't get the default display a second time.

2013-05-04 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to f038df3d7c083fde9448dccd1d81b0e48aea83df (commit)
   from 4dba3925c2103a1320759bc003df68dbc9b0394f (commit)

commit f038df3d7c083fde9448dccd1d81b0e48aea83df
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 30 11:01:10 2012 +0100

Don't get the default display a second time.

 libxfce4kbd-private/xfce-shortcuts-grabber.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c 
b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index f177206..0bff386 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -277,8 +277,7 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
 }
 
   numlock_modifier =
-XkbKeysymToModifiers (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
- GDK_KEY_Num_Lock);
+XkbKeysymToModifiers (GDK_DISPLAY_XDISPLAY (display), GDK_KEY_Num_Lock);
 
   for (i = 0; i  n_keys; i ++)
 {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:xfce-4.10 Prefer exo-open for opening the manual pages.

2013-05-04 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 6768c125334050f26065585d0bd6f6207ea5d255 (commit)
   from f038df3d7c083fde9448dccd1d81b0e48aea83df (commit)

commit 6768c125334050f26065585d0bd6f6207ea5d255
Author: Nick Schermer n...@xfce.org
Date:   Tue May 1 22:05:35 2012 +0200

Prefer exo-open for opening the manual pages.

gtk_show_uri() could fail if the mimelist is not properly
configured or gvfs is missing. Instead try exo-open first
because it is likely this is installed.

 libxfce4ui/xfce-dialogs.c |   26 ++
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/libxfce4ui/xfce-dialogs.c b/libxfce4ui/xfce-dialogs.c
index 8fab5c9..762b610 100644
--- a/libxfce4ui/xfce-dialogs.c
+++ b/libxfce4ui/xfce-dialogs.c
@@ -38,11 +38,10 @@
 #include libxfce4ui/xfce-dialogs.h
 #include libxfce4ui/xfce-gtk-extensions.h
 #include libxfce4ui/xfce-gdk-extensions.h
+#include libxfce4ui/xfce-spawn.h
 #include libxfce4ui/libxfce4ui-private.h
 #include libxfce4ui/libxfce4ui-alias.h
 
-#define NOTNULL(str) ((str) != NULL ? (str) : )
-
 
 
 static void
@@ -69,12 +68,31 @@ xfce_dialog_show_help_uri (GdkScreen *screen,
GtkWindow *parent,
GString   *uri)
 {
-  GError *error = NULL;
+  GError   *error = NULL;
+  gchar*path;
+  gchar*cmd;
+  gboolean  result;
 
   g_return_if_fail (GDK_IS_SCREEN (screen));
   g_return_if_fail (parent == NULL || GTK_IS_WINDOW (parent));
 
-  if (!gtk_show_uri (screen, uri-str, gtk_get_current_event_time (), error))
+  path = g_find_program_in_path (exo-open);
+  if (G_LIKELY (path != NULL))
+{
+  cmd = g_strdup_printf (%s --launch WebBrowser '%s', path, uri-str);
+
+  result = xfce_spawn_command_line_on_screen (screen, cmd, FALSE, TRUE, 
error);
+
+  g_free (path);
+  g_free (cmd);
+}
+  else
+{
+  /* not very likely to happen, but it is possible exo is not installed */
+  result = gtk_show_uri (screen, uri-str, gtk_get_current_event_time (), 
error);
+}
+
+  if (!result)
 {
   xfce_dialog_show_error (parent, error,
   _(Failed to open web browser for online documentation));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Update NEWS with some missing items.

2013-04-21 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to cc2f8926b876cfad4bfeb9337ccd3f0ab7568153 (commit)
   from 5b72a63b5b5805a2ea7752ea5527dbea4c49c9b3 (commit)

commit cc2f8926b876cfad4bfeb9337ccd3f0ab7568153
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Apr 14 16:03:11 2013 +0200

Update NEWS with some missing items.

 NEWS |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index ea4fac0..2fec510 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,8 @@ Version 0.2.3git:
   Bugs fixed:
 * Fix notifications not disappearing after clicking an action button.
 * Handle timeout correctly when smaller than fading time (bug #8580).
+* Avoid flickering of the notifications.
+* Accept uri of images in icon_name parameter.
 * Parse body with g_markup_escape_text which allows us to handle
   span attributes missused by some clients and to parse strings with
   unusual caracters such as  (bug #7773, #8187).
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Add an icon to the notification preview.

2013-04-21 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 91663916b943b7019b7ce2b06be2bf96f98590ab (commit)
   from cc2f8926b876cfad4bfeb9337ccd3f0ab7568153 (commit)

commit 91663916b943b7019b7ce2b06be2bf96f98590ab
Author: Christian Hesse l...@eworm.de
Date:   Sun Apr 21 10:35:16 2013 +0200

Add an icon to the notification preview.

 NEWS|   10 +-
 xfce4-notifyd-config/main.c |2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 2fec510..6802e38 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@
 | Xfce Notify Daemon |
 ++
 
-Version 0.2.3git:
+Version 0.2.3:
 
   libnotify is now required as a dependency to build a test suite and to
   show improved notification previews.
@@ -26,6 +26,14 @@ Version 0.2.3git:
 * Do not kill notification daemon to apply new theme. Instead, handle
   style updates of existing notifications.
 * Show a button in the notification preview (bug #9982).
+* Add an icon to the notification preview.
+
+  Updated translations: Arabic, Basque, Brazilian, Bulgarian, Castilian,
+  Chinese (China), Chinese (Taiwan), Croatian, Danish, English, Finnish,
+  Flemish, French, Greek, Hebrew, Hungarian, Italian, Japanese, Kazakh,
+  Korean, Lithuanian, Polish, Portuguese, Romanian, Russian, Serbian,
+  Swedish, Turkish, Ukrainian, Uyghur and Valencian.
+
 
 Version 0.2.2 (06 August 2011):
 
diff --git a/xfce4-notifyd-config/main.c b/xfce4-notifyd-config/main.c
index 666f338..b0f6d26 100644
--- a/xfce4-notifyd-config/main.c
+++ b/xfce4-notifyd-config/main.c
@@ -56,7 +56,7 @@ xfce_notifyd_config_show_notification_preview(GtkWindow 
*parent_window)
 notification =
 notify_notification_new(_(Notification Preview),
 _(This is how notifications will look like),
-NULL);
+xfce4-notifyd);
 
 notify_notification_add_action(notification,
button,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Get ready for new release.

2013-04-21 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 98299ba35c469b3ea3622fab00f4fca9d4b582fd (commit)
   from 91663916b943b7019b7ce2b06be2bf96f98590ab (commit)

commit 98299ba35c469b3ea3622fab00f4fca9d4b582fd
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Apr 21 11:01:22 2013 +0200

Get ready for new release.

 configure.ac.in |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 7adb83a..ab3c9f6 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -8,9 +8,9 @@ dnl
 dnl version info
 m4_define([xfce4_notifyd_version_major], [0])
 m4_define([xfce4_notifyd_version_minor], [2])
-m4_define([xfce4_notifyd_version_micro], [2])
+m4_define([xfce4_notifyd_version_micro], [3])
 m4_define([xfce4_notifyd_version_build], [@REVISION@])
-m4_define([xfce4_notifyd_version_tag], [git])
+m4_define([xfce4_notifyd_version_tag], [])
 m4_define([xfce4_notifyd_version], 
[xfce4_notifyd_version_major().xfce4_notifyd_version_minor().xfce4_notifyd_version_micro()ifelse(xfce4_notifyd_version_tag(),
 [git], [xfce4_notifyd_version_tag()-xfce4_notifyd_version_build()], 
[xfce4_notifyd_version_tag()])])
 
 m4_define([notifications_spec_version], [0.9])
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd|xfce4-notifyd-0.2.3 Creating annotated tag xfce4-notifyd-0.2.3

2013-04-21 Thread Jérôme Guelfucci
Updating annotated tag refs/tags/xfce4-notifyd-0.2.3
 as new annotated tag
 to e0eff9b1003249d87e47780a9920af02d8846129 (tag)
   succeeds xfce4-notifyd-0.2.2-136-g9166391
  tagged by Jérôme Guelfucci jero...@xfce.org
 on 2013-04-21 11:01 +0200

Jérôme Guelfucci (1):
  Get ready for new release.

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Fix typos in NEWS file.

2013-04-21 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 1d7a94cd8f96f67d69b6b2bf918de1dbe3f2d5e6 (commit)
   from 98299ba35c469b3ea3622fab00f4fca9d4b582fd (commit)

commit 1d7a94cd8f96f67d69b6b2bf918de1dbe3f2d5e6
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Apr 21 11:02:47 2013 +0200

Fix typos in NEWS file.

 NEWS |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 6802e38..25f4b17 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@
 | Xfce Notify Daemon |
 ++
 
-Version 0.2.3:
+Version 0.2.3 (21 April 2013):
 
   libnotify is now required as a dependency to build a test suite and to
   show improved notification previews.
@@ -20,8 +20,8 @@ Version 0.2.3:
 * Avoid flickering of the notifications.
 * Accept uri of images in icon_name parameter.
 * Parse body with g_markup_escape_text which allows us to handle
-  span attributes missused by some clients and to parse strings with
-  unusual caracters such as  (bug #7773, #8187).
+  span attributes misused by some clients and to parse strings with
+  unusual characters such as  (bug #7773, #8187).
 * Respect border-width when drawing the notification (bug #9475).
 * Do not kill notification daemon to apply new theme. Instead, handle
   style updates of existing notifications.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Back to development.

2013-04-21 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to f5c0ea6c9799b41a011a483025d813c524fbdb76 (commit)
   from 1d7a94cd8f96f67d69b6b2bf918de1dbe3f2d5e6 (commit)

commit f5c0ea6c9799b41a011a483025d813c524fbdb76
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Apr 21 11:03:22 2013 +0200

Back to development.

 configure.ac.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index ab3c9f6..77e7c8c 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -10,7 +10,7 @@ m4_define([xfce4_notifyd_version_major], [0])
 m4_define([xfce4_notifyd_version_minor], [2])
 m4_define([xfce4_notifyd_version_micro], [3])
 m4_define([xfce4_notifyd_version_build], [@REVISION@])
-m4_define([xfce4_notifyd_version_tag], [])
+m4_define([xfce4_notifyd_version_tag], [git])
 m4_define([xfce4_notifyd_version], 
[xfce4_notifyd_version_major().xfce4_notifyd_version_minor().xfce4_notifyd_version_micro()ifelse(xfce4_notifyd_version_tag(),
 [git], [xfce4_notifyd_version_tag()-xfce4_notifyd_version_build()], 
[xfce4_notifyd_version_tag()])])
 
 m4_define([notifications_spec_version], [0.9])
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Fix border drawing when compositing is disabled (bug #10021).

2013-04-21 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 8a38a78b8335f894d0f399d379acc6b17b5a65d3 (commit)
   from f5c0ea6c9799b41a011a483025d813c524fbdb76 (commit)

commit 8a38a78b8335f894d0f399d379acc6b17b5a65d3
Author: Coacher itumay...@gmail.com
Date:   Sun Apr 21 16:43:04 2013 +0200

Fix border drawing when compositing is disabled (bug #10021).

 xfce4-notifyd/xfce-notify-window.c |6 +-
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index 4a79d2d..285a70e 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -527,11 +527,7 @@ xfce_notify_window_expose(GtkWidget *widget,
 gdk_cairo_set_source_color(cr, style-bg[GTK_STATE_NORMAL]);
 cairo_fill(cr);
 
-if(window-mouse_hover) {
-/* but be sure to set the curved path because the code
-* below needs it */
-cairo_append_path(cr, bg_path);
-}
+cairo_append_path(cr, bg_path);
 }
 
 if(window-mouse_hover) {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Properly fix make distcheck.

2013-04-14 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 090e1b708940bb5cc76dc857a786dfff949d6550 (commit)
   from 1b1b2a62e3199abf075b33615ccc073a1e3b1fd3 (commit)

commit 090e1b708940bb5cc76dc857a786dfff949d6550
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Apr 14 15:44:39 2013 +0200

Properly fix make distcheck.

Also add AM_V_GEN calls to clean the build log.

 Makefile.am |  105 +-
 1 files changed, 60 insertions(+), 45 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 4ca28f1..0d47598 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,19 +22,19 @@ bin_PROGRAMS = xfce4-notifyd-config/xfce4-notifyd-config
 
 xfce4_notifyd_xfce4_notifyd_SOURCES = \
xfce4-notifyd/main.c \
-   notify-dbus.h \
+   xfce4-notifyd/notify-dbus.h \
xfce4-notifyd/xfce-notify-daemon.c \
xfce4-notifyd/xfce-notify-daemon.h \
-   xfce-notify-enum-types.c \
-   xfce-notify-enum-types.h \
-   xfce-notify-marshal.c \
-   xfce-notify-marshal.h \
+   xfce4-notifyd/xfce-notify-enum-types.c \
+   xfce4-notifyd/xfce-notify-enum-types.h \
+   xfce4-notifyd/xfce-notify-marshal.c \
+   xfce4-notifyd/xfce-notify-marshal.h \
xfce4-notifyd/xfce-notify-window.c \
xfce4-notifyd/xfce-notify-window.h
 
 xfce4_notifyd_config_xfce4_notifyd_config_SOURCES = \
xfce4-notifyd-config/main.c \
-   xfce4-notifyd-config.ui.h
+   xfce4-notifyd-config/xfce4-notifyd-config.ui.h
 
 common_cflags = \
-I$(builddir)   \
@@ -107,7 +107,7 @@ zomgponiesthemedir = 
$(theme_dir)/ZOMG-PONIES!/xfce-notify-4.0
 dist_zomgponiestheme_DATA = themes/ZOMG-PONIES!/gtkrc
 
 built_xfce4_notifyd = \
-   notify-dbus.h
+   xfce4-notifyd/notify-dbus.h
 
 clean_xfce4_notifyd = \
$(built_xfce4_notifyd)
@@ -115,17 +115,17 @@ clean_xfce4_notifyd = \
 if MAINTAINER_MODE
 
 built_xfce4_notifyd += \
-   xfce-notify-marshal.c \
-   xfce-notify-marshal.h \
-   xfce-notify-enum-types.c \
-   xfce-notify-enum-types.h
+   xfce4-notifyd/xfce-notify-marshal.c \
+   xfce4-notifyd/xfce-notify-marshal.h \
+   xfce4-notifyd/xfce-notify-enum-types.c \
+   xfce4-notifyd/xfce-notify-enum-types.h
 
 built_xfce4_notifyd_config = \
-   xfce4-notifyd-config.ui.h
+   xfce4-notifyd-config/xfce4-notifyd-config.ui.h
 
 clean_xfce4_notifyd += \
-   stamp-xfce-notify-enum-types.h \
-   stamp-xfce-notify-marshal.h
+   xfce4-notifyd/stamp-xfce-notify-enum-types.h \
+   xfce4-notifyd/stamp-xfce-notify-marshal.h
 
 endif
 
@@ -158,56 +158,71 @@ DISTCLEANFILES = \
$(distclean_intltool) \
$(distclean_service)
 
-notify-dbus.h: $(srcdir)/xfce4-notifyd/notify-dbus.xml Makefile
+xfce4-notifyd/notify-dbus.h: $(srcdir)/xfce4-notifyd/notify-dbus.xml Makefile
 if USE_OLD_GET_SERVER_INFORMATION_SIGNATURE
-   sed -e 's,arg direction=out name=spec_version type=s/,,' $  
$(F).tmp
-   $(DBUS_BINDING_TOOL) --mode=glib-server --prefix=notify $(F).tmp  $@
-   rm -f $(F).tmp
+   $(AM_V_GEN) (\
+   sed -e 's,arg direction=out name=spec_version type=s/,,' $  
$(F).tmp \
+$(DBUS_BINDING_TOOL) --mode=glib-server --prefix=notify $(F).tmp  
$@ \
+rm -f $(F).tmp \
+   )
 else
-   $(DBUS_BINDING_TOOL) --mode=glib-server --prefix=notify $  $@
+   $(AM_V_GEN) (\
+   $(DBUS_BINDING_TOOL) --mode=glib-server --prefix=notify $  $@ \
+   )
 endif
 
 if MAINTAINER_MODE
 
-xfce-notify-marshal.h: stamp-xfce-notify-marshal.h
+xfce4-notifyd/xfce-notify-marshal.h: xfce4-notifyd/stamp-xfce-notify-marshal.h
@true
-stamp-xfce-notify-marshal.h: $(srcdir)/xfce4-notifyd/xfce-notify-marshal.list 
Makefile
-   @echo '/* this file is autogenerated -- do not edit */'  
xfce-notify-marshal.h
-   @echo  xfce-notify-marshal.h
-   glib-genmarshal --prefix=xfce_notify_marshal 
$(srcdir)/xfce4-notifyd/xfce-notify-marshal.list --header  
xfce-notify-marshal.h
-   echo timestamp $@
-xfce-notify-marshal.c: $(srcdir)/xfce4-notifyd/xfce-notify-marshal.list 
Makefile
-   @echo '/* this file is autogenerated -- do not edit */' $@
-   @echo $@
-   @echo '#include xfce-notify-marshal.h' $@
-   @echo $@
-   glib-genmarshal --prefix=xfce_notify_marshal 
$(srcdir)/xfce4-notifyd/xfce-notify-marshal.list --body $@
-
-xfce-notify-enum-types.h: stamp-xfce-notify-enum-types.h
+
+xfce4-notifyd/stamp-xfce-notify-marshal.h: 
$(srcdir)/xfce4-notifyd/xfce-notify-marshal.list Makefile
+   $(AM_V_GEN) ( \
+   echo '/* this file is autogenerated -- do not edit */'  
xfce4-notifyd/xfce-notify-marshal.h \
+   glib-genmarshal --prefix=xfce_notify_marshal --header 
$(srcdir)/xfce4-notifyd/xfce-notify-marshal.list \
+   xfce4-notifyd/xfce-notify-marshal.h \
+echo timestamp $@ )
+
+xfce4-notifyd/xfce-notify-marshal.c: 
$(srcdir)/xfce4-notifyd/xfce-notify-marshal.list Makefile
+   $(AM_V_GEN) ( \
+   echo '/* this file

[Xfce4-commits] xfce4-notifyd:master Update Smoke theme.

2013-04-14 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 18c49e73a19c735d1170ac4c0dc3b8c5d9f94d57 (commit)
   from 090e1b708940bb5cc76dc857a786dfff949d6550 (commit)

commit 18c49e73a19c735d1170ac4c0dc3b8c5d9f94d57
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Apr 14 15:56:12 2013 +0200

Update Smoke theme.

 themes/Smoke/gtkrc |   10 --
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/themes/Smoke/gtkrc b/themes/Smoke/gtkrc
index 67a40e9..af3dd93 100644
--- a/themes/Smoke/gtkrc
+++ b/themes/Smoke/gtkrc
@@ -1,9 +1,9 @@
 style smoke-window
 {
-bg[NORMAL] = #4d4d4d 
+bg[NORMAL] = #4d4d4d
 XfceNotifyWindow::border-color = #ff
 XfceNotifyWindow::border-radius = 10.0
-XfceNotifyWindow::border-width = 3.0
+XfceNotifyWindow::border-width-hover = 3.0
 }
 class XfceNotifyWindow style smoke-window
 
@@ -22,3 +22,9 @@ style smoke-text
 GtkWidget::link-color = #a7a7a7
 }
 widget_class XfceNotifyWindow.*.GtkLabel style smoke-text
+
+style smoke-summary
+{
+font_name = Bold
+}
+widget XfceNotifyWindow.*.summary style smoke-summary
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Update README.

2013-04-14 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 6fa92033f0bbea3fb7156cd2860612ed8bd33e1d (commit)
   from 18c49e73a19c735d1170ac4c0dc3b8c5d9f94d57 (commit)

commit 6fa92033f0bbea3fb7156cd2860612ed8bd33e1d
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Apr 14 15:56:41 2013 +0200

Update README.

 README |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/README b/README
index 0a6a552..2f36ad2 100644
--- a/README
+++ b/README
@@ -16,6 +16,7 @@ Requirements:
 * libxfce4util 4.4.0
 * libxfce4ui 4.7.0
 * xfconf 4.6
+* libnotify 0.7
 
 Additionally, I'd recommend use with a compositing manager running; in that
 case xfce4-notifyd will look a bit nicer and will be semi-transparent and
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Tentative fix for make distcheck.

2013-04-07 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to a9997e5a7282646caeec64f5e5cfb7c58a114a10 (commit)
   from 4414371b4356f1ec281c666309b23f0a12be9eaf (commit)

commit a9997e5a7282646caeec64f5e5cfb7c58a114a10
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Apr 7 11:17:09 2013 +0200

Tentative fix for make distcheck.

This still needs some work and is not totally clean.

 Makefile.am |   69 ---
 configure.ac.in |2 +-
 2 files changed, 36 insertions(+), 35 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index f2ebd99..747c4c6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,7 +13,7 @@ distclean_intltool = \
intltool-merge \
intltool-update
 
-distuninstallcheck_listfiles = \ 
+distuninstallcheck_listfiles = \
find . -type f -print | grep -v ./share/icons/hicolor/icon-theme.cache
 
 xfce4_notifyddir = $(HELPER_PATH_PREFIX)/xfce4/notifyd
@@ -22,21 +22,22 @@ bin_PROGRAMS = xfce4-notifyd-config/xfce4-notifyd-config
 
 xfce4_notifyd_xfce4_notifyd_SOURCES = \
xfce4-notifyd/main.c \
-   xfce4-notifyd/notify-dbus.h \
+   notify-dbus.h \
xfce4-notifyd/xfce-notify-daemon.c \
xfce4-notifyd/xfce-notify-daemon.h \
-   xfce4-notifyd/xfce-notify-enum-types.c \
-   xfce4-notifyd/xfce-notify-enum-types.h \
-   xfce4-notifyd/xfce-notify-marshal.c \
-   xfce4-notifyd/xfce-notify-marshal.h \
+   xfce-notify-enum-types.c \
+   xfce-notify-enum-types.h \
+   xfce-notify-marshal.c \
+   xfce-notify-marshal.h \
xfce4-notifyd/xfce-notify-window.c \
xfce4-notifyd/xfce-notify-window.h
 
 xfce4_notifyd_config_xfce4_notifyd_config_SOURCES = \
xfce4-notifyd-config/main.c \
-   xfce4-notifyd-config/xfce4-notifyd-config.ui.h
+   xfce4-notifyd-config.ui.h
 
 common_cflags = \
+   -I$(builddir)   \
-DLOCALEDIR=\$(localedir)\ \
$(GTK_CFLAGS) \
$(LIBXFCE4UTIL_CFLAGS) \
@@ -104,7 +105,7 @@ zomgponiesthemedir = 
$(theme_dir)/ZOMG-PONIES!/xfce-notify-4.0
 dist_zomgponiestheme_DATA = themes/ZOMG-PONIES!/gtkrc
 
 built_xfce4_notifyd = \
-   xfce4-notifyd/notify-dbus.h
+   notify-dbus.h
 
 clean_xfce4_notifyd = \
$(built_xfce4_notifyd)
@@ -112,17 +113,17 @@ clean_xfce4_notifyd = \
 if MAINTAINER_MODE
 
 built_xfce4_notifyd += \
-   xfce4-notifyd/xfce-notify-marshal.c \
-   xfce4-notifyd/xfce-notify-marshal.h \
-   xfce4-notifyd/xfce-notify-enum-types.c \
-   xfce4-notifyd/xfce-notify-enum-types.h
+   xfce-notify-marshal.c \
+   xfce-notify-marshal.h \
+   xfce-notify-enum-types.c \
+   xfce-notify-enum-types.h
 
 built_xfce4_notifyd_config = \
-   xfce4-notifyd-config/xfce4-notifyd-config.ui.h
+   xfce4-notifyd-config.ui.h
 
 clean_xfce4_notifyd += \
-   xfce4-notifyd/stamp-xfce-notify-enum-types.h \
-   xfce4-notifyd/stamp-xfce-notify-marshal.h
+   stamp-xfce-notify-enum-types.h \
+   stamp-xfce-notify-marshal.h
 
 endif
 
@@ -155,7 +156,7 @@ DISTCLEANFILES = \
$(distclean_intltool) \
$(distclean_service)
 
-xfce4-notifyd/notify-dbus.h: $(srcdir)/xfce4-notifyd/notify-dbus.xml Makefile
+notify-dbus.h: $(srcdir)/xfce4-notifyd/notify-dbus.xml Makefile
 if USE_OLD_GET_SERVER_INFORMATION_SIGNATURE
sed -e 's,arg direction=out name=spec_version type=s/,,' $  
$(F).tmp
$(DBUS_BINDING_TOOL) --mode=glib-server --prefix=notify $(F).tmp  $@
@@ -166,44 +167,44 @@ endif
 
 if MAINTAINER_MODE
 
-xfce4-notifyd/xfce-notify-marshal.h: xfce4-notifyd/stamp-xfce-notify-marshal.h
+xfce-notify-marshal.h: stamp-xfce-notify-marshal.h
@true
-xfce4-notifyd/stamp-xfce-notify-marshal.h: 
$(srcdir)/xfce4-notifyd/xfce-notify-marshal.list Makefile
-   @echo '/* this file is autogenerated -- do not edit */' 
xfce4-notifyd/xfce-notify-marshal.h
-   @echo xfce4-notifyd/xfce-notify-marshal.h
-   glib-genmarshal --prefix=xfce_notify_marshal 
xfce4-notifyd/xfce-notify-marshal.list --header 
xfce4-notifyd/xfce-notify-marshal.h
+stamp-xfce-notify-marshal.h: $(srcdir)/xfce4-notifyd/xfce-notify-marshal.list 
Makefile
+   @echo '/* this file is autogenerated -- do not edit */'  
xfce-notify-marshal.h
+   @echo  xfce-notify-marshal.h
+   glib-genmarshal --prefix=xfce_notify_marshal 
$(srcdir)/xfce4-notifyd/xfce-notify-marshal.list --header  
xfce-notify-marshal.h
echo timestamp $@
-xfce4-notifyd/xfce-notify-marshal.c: 
$(srcdir)/xfce4-notifyd/xfce-notify-marshal.list Makefile
+xfce-notify-marshal.c: $(srcdir)/xfce4-notifyd/xfce-notify-marshal.list 
Makefile
@echo '/* this file is autogenerated -- do not edit */' $@
@echo $@
@echo '#include xfce-notify-marshal.h' $@
@echo $@
-   glib-genmarshal --prefix=xfce_notify_marshal 
xfce4-notifyd/xfce-notify-marshal.list --body $@
+   glib-genmarshal --prefix=xfce_notify_marshal 
$(srcdir)/xfce4-notifyd/xfce-notify-marshal.list --body

[Xfce4-commits] xfce4-notifyd:master Show a button in the notification preview (bug #9982).

2013-04-07 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to e8bd39fc0a0292eba237a55b2c10feec8e97eb13 (commit)
   from a9997e5a7282646caeec64f5e5cfb7c58a114a10 (commit)

commit e8bd39fc0a0292eba237a55b2c10feec8e97eb13
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Apr 7 11:21:32 2013 +0200

Show a button in the notification preview (bug #9982).

 Makefile.am |6 ++--
 NEWS|4 ++
 configure.ac.in |5 +--
 xfce4-notifyd-config/main.c |   67 ++-
 4 files changed, 55 insertions(+), 27 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 747c4c6..4ca28f1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -52,6 +52,7 @@ xfce4_notifyd_xfce4_notifyd_CFLAGS = \
 
 xfce4_notifyd_config_xfce4_notifyd_config_CFLAGS = \
-DG_LOG_DOMAIN=\xfce4-notifyd-config\ \
+   $(LIBNOTIFY_CFLAGS) \
$(common_cflags)
 
 common_ldadd = \
@@ -66,7 +67,8 @@ xfce4_notifyd_xfce4_notifyd_LDADD = \
$(LIBX11_LIBS)
 
 xfce4_notifyd_config_xfce4_notifyd_config_LDADD = \
-   $(common_ldadd)
+   $(common_ldadd) \
+   $(LIBNOTIFY_LIBS)
 
 
 servicedir = $(datadir)/dbus-1/services
@@ -238,7 +240,6 @@ release: gpg-sign
-rm $(PACKAGE)-$(VERSION).tar.gz
 
 #Tests
-if HAVE_LIBNOTIFY
 noinst_PROGRAMS = \
tests/test-text \
tests/test-positioning \
@@ -262,4 +263,3 @@ tests_test_positioning_LDADD = $(tests_ldadd)
 tests_test_text_SOURCES = tests/test-text.c
 tests_test_text_CFLAGS = $(tests_cflags)
 tests_test_text_LDADD = $(tests_ldadd)
-endif
diff --git a/NEWS b/NEWS
index 17ca979..ea4fac0 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,9 @@
 
 Version 0.2.3git:
 
+  libnotify is now required as a dependency to build a test suite and to
+  show improved notification previews.
+
   Features:
 * Add a category to the settings dialog for Xfce4 Settings Manager.
 * Add widget names to summary (summary) and body (body) widgets
@@ -20,6 +23,7 @@ Version 0.2.3git:
 * Respect border-width when drawing the notification (bug #9475).
 * Do not kill notification daemon to apply new theme. Instead, handle
   style updates of existing notifications.
+* Show a button in the notification preview (bug #9982).
 
 Version 0.2.2 (06 August 2011):
 
diff --git a/configure.ac.in b/configure.ac.in
index 101e334..7adb83a 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -67,10 +67,7 @@ XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [0.1.0svn-r26876])
 XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0])
 XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.0.0])
 XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.72])
-
-dnl optionnal
-XDT_CHECK_OPTIONAL_PACKAGE([LIBNOTIFY], [libnotify], [0.7.0], [notifications],
-   [Test suite support], [yes])
+XDT_CHECK_PACKAGE([LIBNOTIFY], [libnotify], [0.7.0])
 
 AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool])
 AS_IF([test -z $DBUS_BINDING_TOOL],
diff --git a/xfce4-notifyd-config/main.c b/xfce4-notifyd-config/main.c
index d3a4726..666f338 100644
--- a/xfce4-notifyd-config/main.c
+++ b/xfce4-notifyd-config/main.c
@@ -35,9 +35,46 @@
 
 #include xfconf/xfconf.h
 #include libxfce4ui/libxfce4ui.h
+#include libnotify/notify.h
 
 #include xfce4-notifyd-config.ui.h
 
+static void
+xfce_notifyd_config_show_notification_callback(NotifyNotification 
*notification,
+   const char *action,
+   gpointerunused)
+{
+  /* Don't do anything, we just have a button to show its style */
+}
+
+static void
+xfce_notifyd_config_show_notification_preview(GtkWindow *parent_window)
+{
+NotifyNotification *notification;
+GError *error = NULL;
+
+notification =
+notify_notification_new(_(Notification Preview),
+_(This is how notifications will look like),
+NULL);
+
+notify_notification_add_action(notification,
+   button,
+   _(Button),
+   (NotifyActionCallback) 
xfce_notifyd_config_show_notification_callback,
+   NULL,
+   NULL);
+
+if (!notify_notification_show(notification, error)) {
+xfce_dialog_show_error(parent_window, error,
+   _(Notification preview failed));
+
+g_error_free(error);
+}
+
+g_object_unref(notification);
+}
+
 static gchar *
 xfce4_notifyd_slider_format_value(GtkScale *slider,
   gdouble value,
@@ -87,21 +124,12 @@ xfce4_notifyd_config_theme_changed(XfconfChannel *channel,
 {
 gtk_tree_model_get(GTK_TREE_MODEL(ls), iter, 0, theme, -1);
 if(!strcmp(theme, new_theme)) {
-GError *error = NULL;
 
 gtk_combo_box_set_active_iter(GTK_COMBO_BOX(theme_combo

[Xfce4-commits] xfce4-notifyd:master Add more border style properties.

2013-03-17 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 41847681d21e0cfa9534bfda13646fa9838b9e7a (commit)
   from 0c3b3034a66fa7d2cea0d82379771277f3979283 (commit)

commit 41847681d21e0cfa9534bfda13646fa9838b9e7a
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Mar 17 11:33:23 2013 +0100

Add more border style properties.

It is now possible to tweak the border in normal and in hovered state
with different widths and colors.

 xfce4-notifyd/xfce-notify-window.c |   56 +--
 1 files changed, 40 insertions(+), 16 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index 4aedc5c..4a79d2d 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -163,6 +163,13 @@ xfce_notify_window_class_init(XfceNotifyWindowClass *klass)

G_PARAM_READABLE));
 
 gtk_widget_class_install_style_property(widget_class,
+
g_param_spec_boxed(border-color-hover,
+   border color 
hover,
+   the color of 
the border when hovering the notification,
+   GDK_TYPE_COLOR,
+   
G_PARAM_READABLE));
+
+gtk_widget_class_install_style_property(widget_class,
 
g_param_spec_double(border-radius,
 border 
radius,
 the radius of 
the window border's curved corners,
@@ -177,6 +184,13 @@ xfce_notify_window_class_init(XfceNotifyWindowClass *klass)
 
DEFAULT_BORDER_WIDTH,
 
G_PARAM_READABLE));
 gtk_widget_class_install_style_property(widget_class,
+
g_param_spec_double(border-width-hover,
+border width 
hover,
+the width of 
the border when hovering the notification,
+0.0, 8.0,
+
DEFAULT_BORDER_WIDTH,
+
G_PARAM_READABLE));
+gtk_widget_class_install_style_property(widget_class,
 g_param_spec_double(padding,
 padding,
 the padding 
of the text/icon to the notification's border,
@@ -411,10 +425,17 @@ xfce_notify_window_ensure_bg_path(XfceNotifyWindow 
*window,
 
 gtk_widget_size_request(GTK_WIDGET(window), req);
 
-gtk_widget_style_get(widget,
- border-radius, radius,
- border-width, border_width,
- NULL);
+if (!window-mouse_hover) {
+gtk_widget_style_get(widget,
+ border-radius, radius,
+ border-width, border_width,
+ NULL);
+} else {
+gtk_widget_style_get(widget,
+ border-radius, radius,
+ border-width-hover, border_width,
+ NULL);
+}
 
 border_padding = border_width / 2.0;
 
@@ -477,6 +498,8 @@ xfce_notify_window_expose(GtkWidget *widget,
 cairo_t *cr;
 GList *children, *l;
 cairo_path_t *bg_path;
+GdkColor *border_color = NULL;
+gdouble border_width = DEFAULT_BORDER_WIDTH;
 
 if(evt-count != 0)
 return FALSE;
@@ -512,24 +535,25 @@ xfce_notify_window_expose(GtkWidget *widget,
 }
 
 if(window-mouse_hover) {
-GdkColor *border_color = NULL;
-gdouble border_width = DEFAULT_BORDER_WIDTH;
-
+gtk_widget_style_get(widget,
+ border-color-hover, border_color,
+ border-width-hover, border_width,
+ NULL);
+} else {
 gtk_widget_style_get(widget,
  border-color, border_color,
  border-width, border_width,
  NULL);
-
-cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
-if(border_color)
-gdk_cairo_set_source_color(cr, border_color);
-else
-cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
-cairo_set_line_width(cr, border_width);
-
-cairo_stroke(cr);
 }
 
+cairo_set_operator(cr

[Xfce4-commits] xfce4-notifyd:master Add a padding theming option (Bug #9876).

2013-03-16 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 0c3b3034a66fa7d2cea0d82379771277f3979283 (commit)
   from 92df710c6ca65880b2b7bbb2d91cfec55cac0254 (commit)

commit 0c3b3034a66fa7d2cea0d82379771277f3979283
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Mar 16 18:57:35 2013 +0100

Add a padding theming option (Bug #9876).

Patch from Dinkel (din...@pimprecords.com).

 xfce4-notifyd/xfce-notify-window.c |   52 +++
 1 files changed, 34 insertions(+), 18 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index 557b9c2..4aedc5c 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -39,6 +39,7 @@
 #define FADE_CHANGE_TIMEOUT50
 #define DEFAULT_RADIUS 10.0
 #define DEFAULT_BORDER_WIDTH   2.0
+#define DEFAULT_PADDING14.0
 #define BORDER 6
 
 struct _XfceNotifyWindow
@@ -175,6 +176,13 @@ xfce_notify_window_class_init(XfceNotifyWindowClass *klass)
 0.0, 8.0,
 
DEFAULT_BORDER_WIDTH,
 
G_PARAM_READABLE));
+gtk_widget_class_install_style_property(widget_class,
+g_param_spec_double(padding,
+padding,
+the padding 
of the text/icon to the notification's border,
+0.0, 30.0,
+
DEFAULT_PADDING,
+
G_PARAM_READABLE));
 }
 
 static void
@@ -182,7 +190,7 @@ xfce_notify_window_init(XfceNotifyWindow *window)
 {
 GdkScreen *screen;
 GtkWidget *tophbox, *align, *vbox;
-gdouble border_radius = DEFAULT_RADIUS;
+gdouble padding = DEFAULT_PADDING;
 
 window-expire_timeout = DEFAULT_EXPIRE_TIMEOUT;
 window-normal_opacity = DEFAULT_NORMAL_OPACITY;
@@ -211,11 +219,11 @@ xfce_notify_window_init(XfceNotifyWindow *window)
 
 gtk_widget_ensure_style(GTK_WIDGET(window));
 gtk_widget_style_get(GTK_WIDGET(window),
- border-radius, border_radius,
+ padding, padding,
  NULL);
 
 tophbox = gtk_hbox_new(FALSE, BORDER);
-gtk_container_set_border_width(GTK_CONTAINER(tophbox), border_radius + 4);
+gtk_container_set_border_width(GTK_CONTAINER(tophbox), padding);
 gtk_widget_show(tophbox);
 gtk_container_add(GTK_CONTAINER(window), tophbox);
 
@@ -389,9 +397,9 @@ xfce_notify_window_ensure_bg_path(XfceNotifyWindow *window,
 gdouble radius = DEFAULT_RADIUS;
 gdouble border_width = DEFAULT_BORDER_WIDTH;
 
-/* this secifies the padding from the edges in order to make
+/* this secifies the border_padding from the edges in order to make
  * sure the border completely fits into the drawing area */
-gdouble padding = 0.0;
+gdouble border_padding = 0.0;
 
 cairo_path_t *flat_path;
 GdkRegion *region;
@@ -408,25 +416,33 @@ xfce_notify_window_ensure_bg_path(XfceNotifyWindow 
*window,
  border-width, border_width,
  NULL);
 
-padding = border_width / 2.0;
+border_padding = border_width / 2.0;
 
 if(radius  0.1) {
 cairo_rectangle(cr, 0, 0, widget-allocation.width,
 widget-allocation.height);
 } else {
-cairo_move_to(cr, padding, radius + padding);
-cairo_arc(cr, radius + padding, radius + padding, radius, M_PI, 
3.0*M_PI/2.0);
-cairo_line_to(cr, widget-allocation.width - radius - padding, 
padding);
-cairo_arc(cr, widget-allocation.width - radius - padding, radius + 
padding, radius,
+cairo_move_to(cr, border_padding, radius + border_padding);
+cairo_arc(cr, radius + border_padding,
+  radius + border_padding, radius,
+  M_PI, 3.0*M_PI/2.0);
+cairo_line_to(cr,
+  widget-allocation.width - radius - border_padding,
+  border_padding);
+cairo_arc(cr,
+  widget-allocation.width - radius - border_padding,
+  radius + border_padding, radius,
   3.0*M_PI/2.0, 0.0);
-cairo_line_to(cr, widget-allocation.width - padding,
-  widget-allocation.height - radius - padding);
-cairo_arc(cr, widget-allocation.width - radius - padding,
-  widget-allocation.height - radius - padding, radius,
-  0.0, M_PI/2.0);
-cairo_line_to(cr, radius + padding, widget-allocation.height - 
padding);
-cairo_arc(cr, radius + padding, widget-allocation.height - radius

[Xfce4-commits] xfdesktop:xfce-4.10 Get ready for 4.10.2 release.

2013-03-10 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 9da21ec6e69190359f1b3b7bdd98886034c3fa3c (commit)
   from 7b2eda13185b9e48d7f2a45f9b327f8d36a4637c (commit)

commit 9da21ec6e69190359f1b3b7bdd98886034c3fa3c
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Mar 10 11:49:44 2013 +0100

Get ready for 4.10.2 release.

 NEWS|5 +
 configure.ac.in |2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 1c17983..e3c13fe 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+4.10.2
+==
+- Fix hang when no backdrop image is selected (Bug #9892).
+- Fix tiling for some images.
+
 4.10.1
 ==
 - Add a tabs width of padding for tooltip text (Bug #9162).
diff --git a/configure.ac.in b/configure.ac.in
index 4d98a05..8ec1ce4 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -6,7 +6,7 @@ dnl
 dnl version info
 m4_define([xfdesktop_version_major], [4])
 m4_define([xfdesktop_version_minor], [10])
-m4_define([xfdesktop_version_micro], [1])
+m4_define([xfdesktop_version_micro], [2])
 m4_define([xfdesktop_version_nano], [])
 m4_define([xfdesktop_version_build], [@REVISION@])
 m4_define([xfdesktop_version_tag],[])
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:xfce-4.10 Bump version tag.

2013-03-10 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 183047717c7aa9b6520d53badc96bcc68e67a6db (commit)
   from 9da21ec6e69190359f1b3b7bdd98886034c3fa3c (commit)

commit 183047717c7aa9b6520d53badc96bcc68e67a6db
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Mar 10 11:54:28 2013 +0100

Bump version tag.

 configure.ac.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 8ec1ce4..450ae6d 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -9,7 +9,7 @@ m4_define([xfdesktop_version_minor], [10])
 m4_define([xfdesktop_version_micro], [2])
 m4_define([xfdesktop_version_nano], [])
 m4_define([xfdesktop_version_build], [@REVISION@])
-m4_define([xfdesktop_version_tag],[])
+m4_define([xfdesktop_version_tag],[git])
 m4_define([xfdesktop_version], 
[xfdesktop_version_major().xfdesktop_version_minor().xfdesktop_version_micro()ifelse(xfdesktop_version_nano(),
 [], [], [.xfdesktop_version_nano()])ifelse(xfdesktop_version_tag(), [git], 
[xfdesktop_version_tag()-xfdesktop_version_build()], 
[xfdesktop_version_tag()])])
 
 dnl minimum required versions
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop|xfdesktop-4.10.2 Creating annotated tag xfdesktop-4.10.2

2013-03-10 Thread Jérôme Guelfucci
Updating annotated tag refs/tags/xfdesktop-4.10.2
 as new annotated tag
 to e7f18809a51de6767ab2a53cbbc90e59d74abc09 (tag)
   succeeds xfdesktop-4.10.1-2-g7b2eda1
  tagged by Jérôme Guelfucci jero...@xfce.org
 on 2013-03-10 11:53 +0100

Jérôme Guelfucci (1):
  Get ready for 4.10.2 release.

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:xfce-4.10 Fix hang when no backdrop image is selected (Bug #9892)

2013-03-09 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to a22643103bf113f58fb31c90c5a8963457d0783c (commit)
   from 7669bff74748508f9d7471eb827cb77cf57bd2af (commit)

commit a22643103bf113f58fb31c90c5a8963457d0783c
Author: Evangelos Foutras evange...@foutrelis.com
Date:   Wed Mar 6 05:58:54 2013 +0200

Fix hang when no backdrop image is selected (Bug #9892)

Checking whether backdrop-priv-image_path exists isn't enough; we'd
also have to check whether backdrop-priv-show_image is TRUE before
proceeding to apply a backdrop image.

When backdrop-priv-show_image is FALSE, iw and ih (image width/height)
will be zero, but can later be used to compute the upper limit of a for
loop as well as other computations.

To solve this, a new boolean variable (apply_backdrop_image) is added
and set to TRUE only if the return value of gdk_pixbuf_get_file_info()
is not NULL (meaning that the image format is recognized).

The above logic error was introduced in commit
ebad377e5cd067cec9f2b402dff4991ddc4cc3b5.

 src/xfce-backdrop.c |   14 +-
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/xfce-backdrop.c b/src/xfce-backdrop.c
index 9a4d7db..f4c2221 100644
--- a/src/xfce-backdrop.c
+++ b/src/xfce-backdrop.c
@@ -924,6 +924,8 @@ GdkPixbuf *
 xfce_backdrop_get_pixbuf(XfceBackdrop *backdrop)
 {
 GdkPixbuf *final_image, *image = NULL, *tmp;
+GdkPixbufFormat *format = NULL;
+gboolean apply_backdrop_image = FALSE;
 gint i, j;
 gint w, h, iw = 0, ih = 0;
 XfceBackdropImageStyle istyle;
@@ -933,8 +935,12 @@ xfce_backdrop_get_pixbuf(XfceBackdrop *backdrop)
 
 g_return_val_if_fail(XFCE_IS_BACKDROP(backdrop), NULL);
 
-if(backdrop-priv-show_image  backdrop-priv-image_path)
-gdk_pixbuf_get_file_info(backdrop-priv-image_path, iw, ih);
+if(backdrop-priv-show_image  backdrop-priv-image_path) {
+format = gdk_pixbuf_get_file_info(backdrop-priv-image_path, iw, 
ih);
+/* make sure we have a usable backdrop image */
+if(format != NULL)
+apply_backdrop_image = TRUE;
+}
 
 if(backdrop-priv-width == 0 || backdrop-priv-height == 0) {
 w = iw;
@@ -956,9 +962,7 @@ xfce_backdrop_get_pixbuf(XfceBackdrop *backdrop)
 final_image = create_solid(backdrop-priv-color1, w, h, FALSE, 
0xff);
 }
 
-/*check if the file exists,
- *and if it doesn't then make the background the single colour*/
-if(!g_file_test(backdrop-priv-image_path, G_FILE_TEST_EXISTS)) {
+if(!apply_backdrop_image) {
 if(backdrop-priv-brightness != 0)
 final_image = adjust_brightness(final_image, 
backdrop-priv-brightness);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:xfce-4.10 Fix tiling for some images

2013-03-09 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 7b2eda13185b9e48d7f2a45f9b327f8d36a4637c (commit)
   from a22643103bf113f58fb31c90c5a8963457d0783c (commit)

commit 7b2eda13185b9e48d7f2a45f9b327f8d36a4637c
Author: Eric Koegel eric.koe...@gmail.com
Date:   Wed Mar 6 20:11:21 2013 +0300

Fix tiling for some images

gdk_pixbuf_get_file_info will return the width and height of the
bounding box in animation files which will cause the tiling
function to fail. This adds a check to get the actual width and
height of the image before tiling it.

 src/xfce-backdrop.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/xfce-backdrop.c b/src/xfce-backdrop.c
index f4c2221..dcf5299 100644
--- a/src/xfce-backdrop.c
+++ b/src/xfce-backdrop.c
@@ -1013,6 +1013,11 @@ xfce_backdrop_get_pixbuf(XfceBackdrop *backdrop)
 case XFCE_BACKDROP_IMAGE_TILED:
 image = gdk_pixbuf_new_from_file(backdrop-priv-image_path, NULL);
 tmp = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, w, h);
+/* Now that the image has been loaded, recalculate the image
+ * size because gdk_pixbuf_get_file_info doesn't always return
+ * the correct size */
+iw = gdk_pixbuf_get_width(image);
+ih = gdk_pixbuf_get_height(image);
 for(i = 0; (i * iw)  w; i++) {
 for(j = 0; (j * ih)  h; j++) {
 gint newx = iw * i, newy = ih * j;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:xfce-4.10 Fix a crash when minimized window icons are resized (Bug #8963)

2013-03-02 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to a93ac3f087f9299de6308a59bb9cb46549b2a38a (commit)
   from 926800c56a3f954bbc7997e6b27673bd233fd456 (commit)

commit a93ac3f087f9299de6308a59bb9cb46549b2a38a
Author: Eric Koegel eric.koe...@gmail.com
Date:   Sat Dec 22 09:56:17 2012 +0300

Fix a crash when minimized window icons are resized (Bug #8963)

 src/xfdesktop-icon-view.c |   12 +++-
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index ef5e869..1ea1296 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -3040,10 +3040,10 @@ xfdesktop_icon_view_paint_icon(XfdesktopIconView 
*icon_view,
 static void
 xfdesktop_grid_do_resize(XfdesktopIconView *icon_view)
 {
-XfdesktopFileIconManager *fmanager;
+XfdesktopFileIconManager *fmanager = NULL;
 GList *l, *leftovers = NULL;
 
-//* move all icons into the pending_icons list and remove from the desktop 
*/
+/* move all icons into the pending_icons list and remove from the desktop 
*/
 for(l = icon_view-priv-icons; l; l = l-next) {
 guint16 old_row, old_col;
 
@@ -3068,8 +3068,9 @@ xfdesktop_grid_do_resize(XfdesktopIconView *icon_view)
 
 DUMP_GRID_LAYOUT(icon_view);
 
-#ifdef ENABLE_FILE_ICONS
-fmanager = XFDESKTOP_FILE_ICON_MANAGER(icon_view-priv-manager);
+#ifdef ENABLE_FILE_ICONS
+if(XFDESKTOP_IS_FILE_ICON_MANAGER(icon_view-priv-manager))
+fmanager = XFDESKTOP_FILE_ICON_MANAGER(icon_view-priv-manager);
 #endif
 
 /* add all icons back */
@@ -3079,7 +3080,8 @@ xfdesktop_grid_do_resize(XfdesktopIconView *icon_view)
 
 #ifdef ENABLE_FILE_ICONS
 /* Try to get the cached position for the new resolution */
-if(xfdesktop_file_icon_manager_get_cached_icon_position(
+if(fmanager != NULL 
+   xfdesktop_file_icon_manager_get_cached_icon_position(
 fmanager,
 
xfdesktop_icon_peek_label(icon),
 row,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:xfce-4.10 Backdrop stops cycling (Bug #8962)

2013-03-02 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 9916e6e0068523c058c9c29ca437b6f41d69cd40 (commit)
   from a93ac3f087f9299de6308a59bb9cb46549b2a38a (commit)

commit 9916e6e0068523c058c9c29ca437b6f41d69cd40
Author: Eric Koegel eric.koe...@gmail.com
Date:   Sat Dec 22 10:13:41 2012 +0300

Backdrop stops cycling (Bug #8962)

Fix the backdrop_timer callback function to return TRUE to keep
the cycle going.

 src/xfce-backdrop.c |   16 +---
 src/xfce-desktop.c  |2 ++
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/xfce-backdrop.c b/src/xfce-backdrop.c
index 600d7fd..b07492f 100644
--- a/src/xfce-backdrop.c
+++ b/src/xfce-backdrop.c
@@ -35,6 +35,8 @@
 #include gdk-pixbuf/gdk-pixbuf.h
 #include gdk-pixbuf/gdk-pixdata.h
 
+#include libxfce4util/libxfce4util.h /* for DBG/TRACE */
+
 #include xfce-backdrop.h
 #include xfce-desktop-enum-types.h
 #include xfdesktop-common.h  /* for DEFAULT_BACKDROP */
@@ -52,7 +54,7 @@ static void xfce_backdrop_get_property(GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
-static void xfce_backdrop_timer(XfceBackdrop *backdrop);
+static gboolean xfce_backdrop_timer(XfceBackdrop *backdrop);
 
 struct _XfceBackdropPriv
 {
@@ -831,12 +833,16 @@ xfce_backdrop_get_saturation(XfceBackdrop *backdrop)
 return backdrop-priv-saturation;
 }
 
-static void
+static gboolean
 xfce_backdrop_timer(XfceBackdrop *backdrop)
 {
-g_return_if_fail(XFCE_IS_BACKDROP(backdrop));
+TRACE(entering);
+
+g_return_val_if_fail(XFCE_IS_BACKDROP(backdrop), FALSE);
 
 g_signal_emit(G_OBJECT(backdrop), backdrop_signals[BACKDROP_CYCLE], 0);
+
+return TRUE;
 }
 
 /**
@@ -854,6 +860,8 @@ xfce_backdrop_set_cycle_timer(XfceBackdrop *backdrop, guint 
cycle_timer)
 {
 g_return_if_fail(XFCE_IS_BACKDROP(backdrop));
 
+TRACE(entering, cycle_timer = %d, cycle_timer);
+
 if(cycle_timer  G_MAXUSHORT)
 cycle_timer = G_MAXUSHORT;
 
@@ -885,6 +893,8 @@ xfce_backdrop_set_cycle_backdrop(XfceBackdrop *backdrop,
 {
 g_return_if_fail(XFCE_IS_BACKDROP(backdrop));
 
+TRACE(entering, cycle_backdrop ? %s, cycle_backdrop == TRUE ? TRUE : 
FALSE);
+
 if(backdrop-priv-cycle_backdrop != cycle_backdrop) {
 backdrop-priv-cycle_backdrop = cycle_backdrop;
 /* Start or stop the backdrop changing */
diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c
index 493795c..526ecf7 100644
--- a/src/xfce-desktop.c
+++ b/src/xfce-desktop.c
@@ -385,6 +385,8 @@ backdrop_cycle_cb(XfceBackdrop *backdrop, gpointer 
user_data)
 {
 const gchar* backdrop_list;
 
+TRACE(entering);
+
 g_return_if_fail(XFCE_IS_BACKDROP(backdrop));
 
 backdrop_list = xfce_backdrop_get_list(backdrop);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:xfce-4.10 Improve menu icon loading (Bug #8795)

2013-03-02 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to e0b84b28de52d26b0a44c495e4ff453717fbd718 (commit)
   from 9916e6e0068523c058c9c29ca437b6f41d69cd40 (commit)

commit e0b84b28de52d26b0a44c495e4ff453717fbd718
Author: Eric Koegel eric.koe...@gmail.com
Date:   Sat Dec 22 11:01:43 2012 +0300

Improve menu icon loading (Bug #8795)

This code checks if the icon theme has the custom icon name and
loads that directly into a gtk_image widget rather than a pixbuf
first, which should provide a small speed improvement when many
items are present in the menu. Should that fail, it will fallback
to checking all other possible locations for the menu item's icon.

 src/xfdesktop-app-menu-item.c |   34 +++---
 1 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/src/xfdesktop-app-menu-item.c b/src/xfdesktop-app-menu-item.c
index 3722c51..d9a1796 100644
--- a/src/xfdesktop-app-menu-item.c
+++ b/src/xfdesktop-app-menu-item.c
@@ -171,30 +171,31 @@ xfdesktop_app_menu_item_set_icon(XfdesktopAppMenuItem 
*app_menu_item)
 const gchar *icon_name;
 gint w, h, size;
 GdkPixbuf *pixbuf = NULL;
-GtkWidget *image;
+GtkWidget *image = NULL;
 GtkIconTheme *icon_theme;
 gchar *p, *name = NULL;
 gchar *filename;
 
 icon_name = garcon_menu_item_get_icon_name(app_menu_item-item);
+icon_theme = gtk_icon_theme_get_default();
 
 if(G_LIKELY(icon_name)) {
 gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, w, h);
 size = MIN(w, h);
 
-if (g_path_is_absolute (icon_name)) {
-pixbuf = gdk_pixbuf_new_from_file_at_scale(icon_name, w, h, TRUE, 
NULL);
-} else {
-icon_theme = gtk_icon_theme_get_default();
-pixbuf = gtk_icon_theme_load_icon(icon_theme, icon_name, size, 0, 
NULL);
-
-if (G_UNLIKELY(pixbuf == NULL)) {
+if(gtk_icon_theme_has_icon(icon_theme, icon_name))
+image = gtk_image_new_from_icon_name(icon_name, 
GTK_ICON_SIZE_MENU);
+else {
+if (g_path_is_absolute(icon_name)) {
+pixbuf = gdk_pixbuf_new_from_file_at_scale(icon_name, w, h, 
TRUE, NULL);
+} else {
 /* try to lookup names like application.png in the theme */
 p = strrchr(icon_name, '.');
 if (p) {
 name = g_strndup(icon_name, p - icon_name);
 pixbuf = gtk_icon_theme_load_icon(icon_theme, name, size, 
0, NULL);
 g_free (name);
+name = NULL;
 }
 
 /* maybe they point to a file in the pixbufs folder */
@@ -202,21 +203,24 @@ xfdesktop_app_menu_item_set_icon(XfdesktopAppMenuItem 
*app_menu_item)
 filename = g_build_filename(pixmaps, icon_name, NULL);
 name = xfce_resource_lookup(XFCE_RESOURCE_DATA, filename);
 g_free(filename);
+}
 
-if(name)
-pixbuf = gdk_pixbuf_new_from_file(name, NULL);
+if(name) {
+pixbuf = gdk_pixbuf_new_from_file_at_scale(name, w, h, 
TRUE, NULL);
 g_free(name);
 }
 }
+
+/* Turn the pixbuf into a gtk_image */
+if(G_LIKELY(pixbuf)) {
+image = gtk_image_new_from_pixbuf(pixbuf);
+g_object_unref(G_OBJECT(pixbuf));
+}
 }
 }
 
-if(G_LIKELY(pixbuf)) {
-image = gtk_image_new_from_pixbuf(pixbuf);
-g_object_unref(G_OBJECT(pixbuf));
-} else {
+if(!GTK_IS_IMAGE(image))
 image = gtk_image_new();
-}
 
 gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(app_menu_item), image);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:xfce-4.10 Add a signal handler for removable devices to update the icon when the theme is changed (Bug #8977)

2013-03-02 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 6fc2ce01eac11e03285a9da3fc228320fa9eeeff (commit)
   from ebad377e5cd067cec9f2b402dff4991ddc4cc3b5 (commit)

commit 6fc2ce01eac11e03285a9da3fc228320fa9eeeff
Author: Brad Hermanson apeit...@gmail.com
Date:   Tue Jan 1 16:25:04 2013 +0300

Add a signal handler for removable devices to update the icon when the 
theme is changed (Bug #8977)

 src/xfdesktop-volume-icon.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/xfdesktop-volume-icon.c b/src/xfdesktop-volume-icon.c
index 734409b..115ae51 100644
--- a/src/xfdesktop-volume-icon.c
+++ b/src/xfdesktop-volume-icon.c
@@ -992,6 +992,11 @@ xfdesktop_volume_icon_new(GVolume *volume,
 g_object_unref(mount);
 }
 
+g_signal_connect_swapped(G_OBJECT(gtk_icon_theme_get_for_screen(screen)),
+ changed,
+ 
G_CALLBACK(xfdesktop_volume_icon_invalidate_pixbuf),
+ volume_icon);
+
 g_signal_connect(volume, changed, 
  G_CALLBACK(xfdesktop_volume_icon_changed), 
  volume_icon);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:xfce-4.10 SVG images are no longer pixilated when scaled up

2013-03-02 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to ebad377e5cd067cec9f2b402dff4991ddc4cc3b5 (commit)
   from e0b84b28de52d26b0a44c495e4ff453717fbd718 (commit)

commit ebad377e5cd067cec9f2b402dff4991ddc4cc3b5
Author: Matthew Harvey matthewharv...@yahoo.com
Date:   Tue Jan 1 09:26:47 2013 +0300

SVG images are no longer pixilated when scaled up

The code was rendering the svg image to a pixbuf and then scaling
it rather than requesting the image at the desired size when creating
the pixbuf.

 src/xfce-backdrop.c |   38 +-
 1 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/src/xfce-backdrop.c b/src/xfce-backdrop.c
index b07492f..9a4d7db 100644
--- a/src/xfce-backdrop.c
+++ b/src/xfce-backdrop.c
@@ -933,17 +933,10 @@ xfce_backdrop_get_pixbuf(XfceBackdrop *backdrop)
 
 g_return_val_if_fail(XFCE_IS_BACKDROP(backdrop), NULL);
 
-if(backdrop-priv-show_image  backdrop-priv-image_path) {
-image = gdk_pixbuf_new_from_file(backdrop-priv-image_path, NULL);
-if(image) {
-iw = gdk_pixbuf_get_width(image);
-ih = gdk_pixbuf_get_height(image);
-}
-}
-
+if(backdrop-priv-show_image  backdrop-priv-image_path)
+gdk_pixbuf_get_file_info(backdrop-priv-image_path, iw, ih);
+
 if(backdrop-priv-width == 0 || backdrop-priv-height == 0) {
-if(!image)
-return NULL;
 w = iw;
 h = ih;
 } else {
@@ -963,7 +956,9 @@ xfce_backdrop_get_pixbuf(XfceBackdrop *backdrop)
 final_image = create_solid(backdrop-priv-color1, w, h, FALSE, 
0xff);
 }
 
-if(!image) {
+/*check if the file exists,
+ *and if it doesn't then make the background the single colour*/
+if(!g_file_test(backdrop-priv-image_path, G_FILE_TEST_EXISTS)) {
 if(backdrop-priv-brightness != 0)
 final_image = adjust_brightness(final_image, 
backdrop-priv-brightness);
 
@@ -1001,6 +996,7 @@ xfce_backdrop_get_pixbuf(XfceBackdrop *backdrop)
 
 switch(istyle) {
 case XFCE_BACKDROP_IMAGE_CENTERED:
+image = gdk_pixbuf_new_from_file(backdrop-priv-image_path, NULL);
 dx = MAX((w - iw) / 2, 0);
 dy = MAX((h - ih) / 2, 0);
 xo = MIN((w - iw) / 2, dx);
@@ -1011,6 +1007,7 @@ xfce_backdrop_get_pixbuf(XfceBackdrop *backdrop)
 break;
 
 case XFCE_BACKDROP_IMAGE_TILED:
+image = gdk_pixbuf_new_from_file(backdrop-priv-image_path, NULL);
 tmp = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, w, h);
 for(i = 0; (i * iw)  w; i++) {
 for(j = 0; (j * ih)  h; j++) {
@@ -1033,10 +1030,10 @@ xfce_backdrop_get_pixbuf(XfceBackdrop *backdrop)
 break;
 
 case XFCE_BACKDROP_IMAGE_STRETCHED:
-xscale = (gdouble)w / iw;
-yscale = (gdouble)h / ih;
+image = gdk_pixbuf_new_from_file_at_scale(
+backdrop-priv-image_path, w, h, FALSE, NULL);
 gdk_pixbuf_composite(image, final_image, 0, 0, w, h,
-0, 0, xscale, yscale, interp, 255);
+0, 0, 1, 1, interp, 255);
 break;
 
 case XFCE_BACKDROP_IMAGE_SCALED:
@@ -1053,9 +1050,12 @@ xfce_backdrop_get_pixbuf(XfceBackdrop *backdrop)
 }
 dx = xo;
 dy = yo;
-
+
+image = gdk_pixbuf_new_from_file_at_scale(
+backdrop-priv-image_path, iw * xscale,
+ih * yscale, TRUE, NULL);
 gdk_pixbuf_composite(image, final_image, dx, dy,
-iw * xscale, ih * yscale, xo, yo, xscale, yscale,
+iw * xscale, ih * yscale, xo, yo, 1, 1,
 interp, 255);
 break;
 
@@ -1071,8 +1071,12 @@ xfce_backdrop_get_pixbuf(XfceBackdrop *backdrop)
 xo = 0;
 yo = (h - (ih * yscale)) * 0.5;
 }
+
+image = gdk_pixbuf_new_from_file_at_scale(
+backdrop-priv-image_path, iw * xscale,
+ih * yscale, TRUE, NULL);
 gdk_pixbuf_composite(image, final_image, 0, 0,
-w, h, xo, yo, xscale, yscale, interp, 255);
+w, h, xo, yo, 1, 1, interp, 255);
 break;
 
 default:
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:xfce-4.10 Add a tabs width of padding for tooltip text (Bug #9162)

2013-03-02 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to d5431819527d34855752d3743db7a2d671426ced (commit)
   from 6fc2ce01eac11e03285a9da3fc228320fa9eeeff (commit)

commit d5431819527d34855752d3743db7a2d671426ced
Author: Eric Koegel eric.koe...@gmail.com
Date:   Fri Jan 18 05:35:47 2013 +0300

Add a tabs width of padding for tooltip text (Bug #9162)

 src/xfdesktop-icon-view.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index 1ea1296..e6b3b69 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -1039,6 +1039,7 @@ xfdesktop_icon_view_show_tooltip(GtkWidget *widget,
 {
 XfdesktopIconView *icon_view = XFDESKTOP_ICON_VIEW(widget);
 const gchar *tip_text;
+gchar *padded_tip_text = NULL;
 
 if(!icon_view-priv-item_under_pointer
|| icon_view-priv-definitely_dragging)
@@ -1050,13 +1051,17 @@ xfdesktop_icon_view_show_tooltip(GtkWidget *widget,
 if(!tip_text)
 return FALSE;
 
+padded_tip_text = g_strdup_printf(%s\t, tip_text);
+
 if(icon_view-priv-tooltip_size  0) {
 gtk_tooltip_set_icon(tooltip,
 xfdesktop_icon_peek_pixbuf(icon_view-priv-item_under_pointer,
icon_view-priv-tooltip_size));
 }
 
-gtk_tooltip_set_text(tooltip, tip_text);
+gtk_tooltip_set_text(tooltip, padded_tip_text);
+
+g_free(padded_tip_text);
 
 return TRUE;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:xfce-4.10 Update NEWS.

2013-03-02 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to d3a3bb5302d1e504141b875e67574a492076ed5f (commit)
   from d5431819527d34855752d3743db7a2d671426ced (commit)

commit d3a3bb5302d1e504141b875e67574a492076ed5f
Author: Nick Schermer n...@xfce.org
Date:   Fri Aug 3 21:50:37 2012 +0200

Update NEWS.

 NEWS |   12 
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index 65c48d0..1c17983 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,15 @@
+4.10.1
+==
+- Add a tabs width of padding for tooltip text (Bug #9162).
+- Fix theming of removable devices'  icons (Bug #8977).
+- SVG images are no longer pixilated when scaled up.
+- Improve menu icon loading (Bug #8795).
+- Fix background cycling (Bug #8962).
+- Fix a crash when minimized window icons are resized (Bug #8963).
+- Fix use-after-free in xfdesktop_regular_file_icon_peek_tooltip (Bug #9059).
+- Translation updates: Arabic, Bulgarian, Croatian, Dutch, Greek, Korean,
+  Polish, Russian, Serbian, Turkish and Uyghur.
+
 4.10.0
 ==
 - Use the correct default value for the 'show thumbnails' checkbox
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop:xfce-4.10 Bump version for new release.

2013-03-02 Thread Jérôme Guelfucci
Updating branch refs/heads/xfce-4.10
 to 7669bff74748508f9d7471eb827cb77cf57bd2af (commit)
   from d3a3bb5302d1e504141b875e67574a492076ed5f (commit)

commit 7669bff74748508f9d7471eb827cb77cf57bd2af
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Mar 2 18:16:49 2013 +0100

Bump version for new release.

 configure.ac.in |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 3df4929..4d98a05 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -6,10 +6,10 @@ dnl
 dnl version info
 m4_define([xfdesktop_version_major], [4])
 m4_define([xfdesktop_version_minor], [10])
-m4_define([xfdesktop_version_micro], [0])
+m4_define([xfdesktop_version_micro], [1])
 m4_define([xfdesktop_version_nano], [])
 m4_define([xfdesktop_version_build], [@REVISION@])
-m4_define([xfdesktop_version_tag],[git])
+m4_define([xfdesktop_version_tag],[])
 m4_define([xfdesktop_version], 
[xfdesktop_version_major().xfdesktop_version_minor().xfdesktop_version_micro()ifelse(xfdesktop_version_nano(),
 [], [], [.xfdesktop_version_nano()])ifelse(xfdesktop_version_tag(), [git], 
[xfdesktop_version_tag()-xfdesktop_version_build()], 
[xfdesktop_version_tag()])])
 
 dnl minimum required versions
@@ -74,7 +74,7 @@ AC_ARG_VAR([DBUS_BINDING_TOOL], [Tool to generate C bindings 
from XML D-Bus inte
 AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool], [no])
 if test x$DBUS_BINDING_TOOL = xno; then
   AC_MSG_ERROR([could not find dbus-binding-tool in \$PATH. You can run
-  ./configure DBUS_BINDING_TOOL=/path/to/dbus-binding-tool to define 
+  ./configure DBUS_BINDING_TOOL=/path/to/dbus-binding-tool to define
   a custom location for it.])
 fi
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfdesktop|xfdesktop-4.10.1 Creating annotated tag xfdesktop-4.10.1

2013-03-02 Thread Jérôme Guelfucci
Updating annotated tag refs/tags/xfdesktop-4.10.1
 as new annotated tag
 to c4957e77d852ec20474ded02add0f27e17dbb995 (tag)
   succeeds xfdesktop-4.10.0-32-gd3a3bb5
  tagged by Jérôme Guelfucci jero...@xfce.org
 on 2013-03-02 18:17 +0100

Jérôme Guelfucci (1):
  Bump version for new release.

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased Make the thumbnailer actually work.

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to 70b5106cc7a32316c70c7c6498fe833d01385cfe (commit)
   from aa519ade6b5419c5f58d786fecaf2eabf0fb29c7 (commit)

commit 70b5106cc7a32316c70c7c6498fe833d01385cfe
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Fri Mar 18 17:45:19 2011 +0100

Make the thumbnailer actually work.

Set the load-finished callback before starting to load an uri and
actually show the web view so that we don't get white thumbnails...

Remove the damage callback as it makes everything lag. Instead force a
window update before retrieving the pixbuf.

Also set a size request for the WebKitView so that it's not 1x1. For
now default to a classic netbook size, needs further thinking.

 plugins/webkit-thumbnailer/webkit-thumbnailer.c |   32 +++---
 1 files changed, 10 insertions(+), 22 deletions(-)

diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer.c 
b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
index cab6fe3..14d80c5 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer.c
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
@@ -99,18 +99,6 @@ webkit_thumbnailer_class_finalize (WebkitThumbnailerClass 
*klass)
 
 
 
-static gboolean
-cb_offscreen_damage (GtkWidget  *widget,
- GdkEventExpose *event,
- GtkWidget  *view)
-{
-  gtk_widget_queue_draw (view);
-
-  return TRUE;
-}
-
-
-
 static void
 webkit_thumbnailer_init (WebkitThumbnailer *thumbnailer)
 {
@@ -140,13 +128,9 @@ webkit_thumbnailer_init (WebkitThumbnailer *thumbnailer)
   gtk_container_add (GTK_CONTAINER (thumbnailer-offscreen),
  thumbnailer-view);
 
-  gtk_widget_show (thumbnailer-offscreen);
-  gtk_widget_queue_draw (thumbnailer-offscreen);
+  gtk_widget_set_size_request (thumbnailer-offscreen, 1024, 600);
 
-  g_signal_connect (thumbnailer-offscreen,
-damage-event,
-G_CALLBACK (cb_offscreen_damage),
-thumbnailer-view);
+  gtk_widget_show_all (thumbnailer-offscreen);
 }
 
 
@@ -203,6 +187,10 @@ cb_view_load_finished (GtkWidget *web_view,
WebKitWebFrame*web_frame,
WebkitThumbnailer *thumbnailer)
 {
+  gtk_widget_queue_draw (web_view);
+  gdk_window_process_updates (gtk_widget_get_window (thumbnailer-offscreen),
+  TRUE);
+
   thumbnailer-tmp =
 gtk_offscreen_window_get_pixbuf (GTK_OFFSCREEN_WINDOW 
(thumbnailer-offscreen));
 
@@ -259,16 +247,16 @@ webkit_thumbnailer_create (TumblerAbstractThumbnailer 
*thumbnailer,
   /* schedule a timeout to avoid waiting forever */
   g_timeout_add_seconds (LOAD_TIMEOUT, cb_load_timeout, NULL);
 
-  /* load the page in the web view */
-  webkit_web_view_load_uri (WEBKIT_WEB_VIEW (webkit_thumbnailer-view),
-uri);
-
   /* retrieve the thumbnail once the page is loaded */
   g_signal_connect (webkit_thumbnailer-view,
 load-finished,
 G_CALLBACK (cb_view_load_finished),
 webkit_thumbnailer);
 
+  /* load the page in the web view */
+  webkit_web_view_load_uri (WEBKIT_WEB_VIEW (webkit_thumbnailer-view),
+uri);
+
   /* wait until the page is loaded */
   gtk_main ();
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased Only connect load-finished once.

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to 21c1b6adb67b629967c3e8b536075e3e3e40b8c3 (commit)
   from 70b5106cc7a32316c70c7c6498fe833d01385cfe (commit)

commit 21c1b6adb67b629967c3e8b536075e3e3e40b8c3
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Fri Mar 18 17:51:44 2011 +0100

Only connect load-finished once.

 plugins/webkit-thumbnailer/webkit-thumbnailer.c |   46 +++---
 1 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer.c 
b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
index 14d80c5..79633ed 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer.c
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
@@ -100,6 +100,23 @@ webkit_thumbnailer_class_finalize (WebkitThumbnailerClass 
*klass)
 
 
 static void
+cb_view_load_finished (GtkWidget *web_view,
+   WebKitWebFrame*web_frame,
+   WebkitThumbnailer *thumbnailer)
+{
+  gtk_widget_queue_draw (web_view);
+  gdk_window_process_updates (gtk_widget_get_window (thumbnailer-offscreen),
+  TRUE);
+
+  thumbnailer-tmp =
+gtk_offscreen_window_get_pixbuf (GTK_OFFSCREEN_WINDOW 
(thumbnailer-offscreen));
+
+  gtk_main_quit ();
+}
+
+
+
+static void
 webkit_thumbnailer_init (WebkitThumbnailer *thumbnailer)
 {
   WebKitWebSettings *settings;
@@ -125,6 +142,12 @@ webkit_thumbnailer_init (WebkitThumbnailer *thumbnailer)
   webkit_web_view_set_settings (WEBKIT_WEB_VIEW(thumbnailer-view),
 settings);
 
+  /* retrieve thumbnails once the page is loaded */
+  g_signal_connect (thumbnailer-view,
+load-finished,
+G_CALLBACK (cb_view_load_finished),
+thumbnailer);
+
   gtk_container_add (GTK_CONTAINER (thumbnailer-offscreen),
  thumbnailer-view);
 
@@ -182,23 +205,6 @@ generate_pixbuf (GdkPixbuf *source,
 
 
 
-static void
-cb_view_load_finished (GtkWidget *web_view,
-   WebKitWebFrame*web_frame,
-   WebkitThumbnailer *thumbnailer)
-{
-  gtk_widget_queue_draw (web_view);
-  gdk_window_process_updates (gtk_widget_get_window (thumbnailer-offscreen),
-  TRUE);
-
-  thumbnailer-tmp =
-gtk_offscreen_window_get_pixbuf (GTK_OFFSCREEN_WINDOW 
(thumbnailer-offscreen));
-
-  gtk_main_quit ();
-}
-
-
-
 static gboolean
 cb_load_timeout (gpointer data)
 {
@@ -247,12 +253,6 @@ webkit_thumbnailer_create (TumblerAbstractThumbnailer 
*thumbnailer,
   /* schedule a timeout to avoid waiting forever */
   g_timeout_add_seconds (LOAD_TIMEOUT, cb_load_timeout, NULL);
 
-  /* retrieve the thumbnail once the page is loaded */
-  g_signal_connect (webkit_thumbnailer-view,
-load-finished,
-G_CALLBACK (cb_view_load_finished),
-webkit_thumbnailer);
-
   /* load the page in the web view */
   webkit_web_view_load_uri (WEBKIT_WEB_VIEW (webkit_thumbnailer-view),
 uri);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased Remove the timeout callback when done.

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to 4f7cd26ac7fc05bef9d6415c007838ec792f4426 (commit)
   from 21c1b6adb67b629967c3e8b536075e3e3e40b8c3 (commit)

commit 4f7cd26ac7fc05bef9d6415c007838ec792f4426
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Fri Mar 18 18:04:12 2011 +0100

Remove the timeout callback when done.

It triggers warnings otherwise, because the main loop does not exist
anymore when the thumbnailing is successful.

 plugins/webkit-thumbnailer/webkit-thumbnailer.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer.c 
b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
index 79633ed..d3b7e78 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer.c
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
@@ -226,6 +226,7 @@ webkit_thumbnailer_create (TumblerAbstractThumbnailer 
*thumbnailer,
   TumblerThumbnail   *thumbnail;
   TumblerImageDatadata;
   GError *error = NULL;
+  guint   timeout_id;
   gintdest_width;
   gintdest_height;
   const gchar*uri;
@@ -251,7 +252,8 @@ webkit_thumbnailer_create (TumblerAbstractThumbnailer 
*thumbnailer,
   uri = tumbler_file_info_get_uri (info);
 
   /* schedule a timeout to avoid waiting forever */
-  g_timeout_add_seconds (LOAD_TIMEOUT, cb_load_timeout, NULL);
+  timeout_id =
+g_timeout_add_seconds (LOAD_TIMEOUT, cb_load_timeout, NULL);
 
   /* load the page in the web view */
   webkit_web_view_load_uri (WEBKIT_WEB_VIEW (webkit_thumbnailer-view),
@@ -260,6 +262,9 @@ webkit_thumbnailer_create (TumblerAbstractThumbnailer 
*thumbnailer,
   /* wait until the page is loaded */
   gtk_main ();
 
+  /* remove the timeout */
+  g_source_remove (timeout_id);
+
   if (webkit_thumbnailer-tmp == NULL)
 {
   /* emit an error signal */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased First try at a webkit thumbnailer.

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to aa519ade6b5419c5f58d786fecaf2eabf0fb29c7 (commit)
   from 8bdc6a810f1a8a45d0ecaf170d4938bebf05c91b (commit)

commit aa519ade6b5419c5f58d786fecaf2eabf0fb29c7
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Fri Mar 18 11:48:44 2011 +0100

First try at a webkit thumbnailer.

It does not work here because GtkOffscreenWindow crashes when shown.
Seems to be a Gtk bug which I'm investigating. I don't guarantee that it
will work for anyone as I obviously could not test it. For example, I
don't know what will happen when called on a huge HTML page.

 acinclude.m4   |   59 --
 configure.ac   |   26 ++-
 plugins/Makefile.am|   17 +-
 .../Makefile.am|   48 ++--
 .../webkit-thumbnailer-plugin.c}   |   15 +-
 .../webkit-thumbnailer-provider.c} |   62 +++---
 .../webkit-thumbnailer-provider.h  |   44 
 .../webkit-thumbnailer.c}  |  229 +++-
 plugins/webkit-thumbnailer/webkit-thumbnailer.h|   44 
 po/POTFILES.in |3 +
 10 files changed, 340 insertions(+), 207 deletions(-)

diff --git a/acinclude.m4 b/acinclude.m4
index 66e79d1..93a5098 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2,18 +2,18 @@ dnl vi:set et ai sw=2 sts=2 ts=2: */
 dnl -
 dnl Copyright (c) 2009 Jannis Pohlmann jan...@xfce.org
 dnl
-dnl This program is free software; you can redistribute it and/or 
+dnl This program is free software; you can redistribute it and/or
 dnl modify it under the terms of the GNU General Public License as
-dnl published by the Free Software Foundation; either version 2 of 
+dnl published by the Free Software Foundation; either version 2 of
 dnl the License, or (at your option) any later version.
 dnl
 dnl This program is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU General Public License for more details.
 dnl
-dnl You should have received a copy of the GNU General Public 
-dnl License along with this program; if not, write to the Free 
+dnl You should have received a copy of the GNU General Public
+dnl License along with this program; if not, write to the Free
 dnl Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 dnl Boston, MA 02110-1301, USA.
 
@@ -48,8 +48,8 @@ AC_DEFUN([TUMBLER_FONT_THUMBNAILER],
 AC_ARG_ENABLE([font-thumbnailer], 
[AC_HELP_STRING([--disable-font-thumbnailer], [Don't build the FreeType font 
thumbnailer plugin])],
   [ac_tumbler_font_thumbnailer=$enableval], [ac_tumbler_font_thumbnailer=yes])
 if test x$ac_tumbler_font_thumbnailer = xyes; then
-  dnl Check for gdk-pixbuf 
-  PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 = 2.14], 
+  dnl Check for gdk-pixbuf
+  PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 = 2.14],
   [
 dnl Check for FreeType 2.x
 FREETYPE_LIBS=
@@ -59,7 +59,7 @@ if test x$ac_tumbler_font_thumbnailer = xyes; then
   AC_MSG_CHECKING([FREETYPE_CFLAGS])
   FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
   AC_MSG_RESULT([$FREETYPE_CFLAGS])
-
+
   AC_MSG_CHECKING([FREETYPE_LIBS])
   FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
   AC_MSG_RESULT([$FREETYPE_LIBS])
@@ -81,7 +81,7 @@ AC_MSG_RESULT([$ac_tumbler_font_thumbnailer])
 
 dnl TUMBLER_JPEG_THUMBNAILER()
 dnl
-dnl Check whether to build and install the JPEG thumbnailer plugin with 
+dnl Check whether to build and install the JPEG thumbnailer plugin with
 dnl EXIF support.
 dnl
 AC_DEFUN([TUMBLER_JPEG_THUMBNAILER],
@@ -89,8 +89,8 @@ AC_DEFUN([TUMBLER_JPEG_THUMBNAILER],
 AC_ARG_ENABLE([jpeg-thumbnailer], 
[AC_HELP_STRING([--disable-jpeg-thumbnailer], [Don't build the JPEG thumbnailer 
plugin with EXIF support])],
   [ac_tumbler_jpeg_thumbnailer=$enableval], [ac_tumbler_jpeg_thumbnailer=yes])
 if test x$ac_tumbler_jpeg_thumbnailer = xyes; then
-  dnl Check for gdk-pixbuf 
-  PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 = 2.14], 
+  dnl Check for gdk-pixbuf
+  PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 = 2.14],
   [
 dnl Check for libjpeg
 LIBJPEG_LIBS=
@@ -131,7 +131,7 @@ AC_ARG_ENABLE([ffmpeg-thumbnailer], 
[AC_HELP_STRING([--disable-ffmpeg-thumbnaile
   [ac_tumbler_ffmpeg_thumbnailer=$enableval], 
[ac_tumbler_ffmpeg_thumbnailer=yes])
 if test x$ac_tumbler_ffmpeg_thumbnailer = xyes; then
   dnl Check for gdk-pixbuf
-  PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 = 2.14], 
+  PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 = 2.14],
   [
 dnl Check for libffmpegthumbnailer
 PKG_CHECK_MODULES([FFMPEGTHUMBNAILER], [libffmpegthumbnailer = 2.0.0], 
[], [ac_tumbler_ffmpeg_thumbnailer

[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased Fix code style.

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to 50ebf15879fc4bfc405fb047d15eae02ee5a2a86 (commit)
   from 4f7cd26ac7fc05bef9d6415c007838ec792f4426 (commit)

commit 50ebf15879fc4bfc405fb047d15eae02ee5a2a86
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Mon May 9 19:22:39 2011 +0200

Fix code style.

 plugins/webkit-thumbnailer/webkit-thumbnailer.c |   21 +
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer.c 
b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
index d3b7e78..65bc474 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer.c
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
@@ -23,17 +23,14 @@
 #include config.h
 #endif
 
-#include math.h
-
 #include glib.h
 #include glib/gi18n.h
 #include glib-object.h
 
 #include gdk-pixbuf/gdk-pixbuf.h
-
-#include webkit/webkit.h
-
+#include math.h
 #include tumbler/tumbler.h
+#include webkit/webkit.h
 
 #include webkit-thumbnailer/webkit-thumbnailer.h
 
@@ -56,9 +53,9 @@ struct _WebkitThumbnailer
 {
   TumblerAbstractThumbnailer __parent__;
 
+  GdkPixbuf *tmp;
   GtkWidget *offscreen;
   GtkWidget *view;
-  GdkPixbuf *tmp;
 };
 
 
@@ -177,8 +174,8 @@ generate_pixbuf (GdkPixbuf *source,
 {
   gdouble hratio;
   gdouble wratio;
-  gintsource_width;
   gintsource_height;
+  gintsource_width;
 
   /* determine the source pixbuf dimensions */
   source_width  = gdk_pixbuf_get_width (source);
@@ -220,16 +217,16 @@ webkit_thumbnailer_create (TumblerAbstractThumbnailer 
*thumbnailer,
GCancellable   *cancellable,
TumblerFileInfo*info)
 {
-  GdkPixbuf  *pixbuf;
-  WebkitThumbnailer  *webkit_thumbnailer;
   TumblerThumbnailFlavor *flavor;
-  TumblerThumbnail   *thumbnail;
+  WebkitThumbnailer  *webkit_thumbnailer;
   TumblerImageDatadata;
+  TumblerThumbnail   *thumbnail;
+  const gchar*uri;
+  GdkPixbuf  *pixbuf;
   GError *error = NULL;
   guint   timeout_id;
-  gintdest_width;
   gintdest_height;
-  const gchar*uri;
+  gintdest_width;
 
   g_return_if_fail (IS_WEBKIT_THUMBNAILER (thumbnailer));
   g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased Minor coding style adjustments.

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to f13862e36abebd924f557a690ecd603e54aa09e3 (commit)
   from 50ebf15879fc4bfc405fb047d15eae02ee5a2a86 (commit)

commit f13862e36abebd924f557a690ecd603e54aa09e3
Author: Jannis Pohlmann jan...@xfce.org
Date:   Thu May 26 16:04:11 2011 +0200

Minor coding style adjustments.

 .../webkit-thumbnailer-provider.c  |3 ---
 .../webkit-thumbnailer-provider.h  |4 ++--
 plugins/webkit-thumbnailer/webkit-thumbnailer.c|   11 ++-
 plugins/webkit-thumbnailer/webkit-thumbnailer.h|4 ++--
 4 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer-provider.c 
b/plugins/webkit-thumbnailer/webkit-thumbnailer-provider.c
index 08501c3..ef45234 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer-provider.c
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer-provider.c
@@ -72,9 +72,6 @@ webkit_thumbnailer_provider_register (TumblerProviderPlugin 
*plugin)
 static void
 webkit_thumbnailer_provider_class_init (WebkitThumbnailerProviderClass *klass)
 {
-  GObjectClass *gobject_class;
-
-  gobject_class = G_OBJECT_CLASS (klass);
 }
 
 
diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer-provider.h 
b/plugins/webkit-thumbnailer/webkit-thumbnailer-provider.h
index 4ee34d6..bb0f349 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer-provider.h
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer-provider.h
@@ -24,7 +24,7 @@
 
 #include glib-object.h
 
-G_BEGIN_DECLS;
+G_BEGIN_DECLS
 
 #define TYPE_WEBKIT_THUMBNAILER_PROVIDER
(webkit_thumbnailer_provider_get_type ())
 #define WEBKIT_THUMBNAILER_PROVIDER(obj)
(G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_WEBKIT_THUMBNAILER_PROVIDER, 
WebkitThumbnailerProvider))
@@ -39,6 +39,6 @@ typedef struct _WebkitThumbnailerProvider  
WebkitThumbnailerProvider;
 GType webkit_thumbnailer_provider_get_type (void) G_GNUC_CONST;
 void  webkit_thumbnailer_provider_register (TumblerProviderPlugin *plugin);
 
-G_END_DECLS;
+G_END_DECLS
 
 #endif /* !__WEBKIT_THUMBNAILER_PROVIDER_H__ */
diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer.c 
b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
index 65bc474..085ad88 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer.c
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
@@ -34,9 +34,12 @@
 
 #include webkit-thumbnailer/webkit-thumbnailer.h
 
+
+
 #define LOAD_TIMEOUT 1000
 
 
+
 static void webkit_thumbnailer_finalize (GObject*object);
 static void webkit_thumbnailer_create   (TumblerAbstractThumbnailer 
*thumbnailer,
  GCancellable   
*cancellable,
@@ -148,7 +151,7 @@ webkit_thumbnailer_init (WebkitThumbnailer *thumbnailer)
   gtk_container_add (GTK_CONTAINER (thumbnailer-offscreen),
  thumbnailer-view);
 
-  gtk_widget_set_size_request (thumbnailer-offscreen, 1024, 600);
+  gtk_widget_set_size_request (thumbnailer-offscreen, 1024, 1024);
 
   gtk_widget_show_all (thumbnailer-offscreen);
 }
@@ -249,12 +252,10 @@ webkit_thumbnailer_create (TumblerAbstractThumbnailer 
*thumbnailer,
   uri = tumbler_file_info_get_uri (info);
 
   /* schedule a timeout to avoid waiting forever */
-  timeout_id =
-g_timeout_add_seconds (LOAD_TIMEOUT, cb_load_timeout, NULL);
+  timeout_id = g_timeout_add_seconds (LOAD_TIMEOUT, cb_load_timeout, NULL);
 
   /* load the page in the web view */
-  webkit_web_view_load_uri (WEBKIT_WEB_VIEW (webkit_thumbnailer-view),
-uri);
+  webkit_web_view_load_uri (WEBKIT_WEB_VIEW (webkit_thumbnailer-view), uri);
 
   /* wait until the page is loaded */
   gtk_main ();
diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer.h 
b/plugins/webkit-thumbnailer/webkit-thumbnailer.h
index e3389f9..040f81c 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer.h
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer.h
@@ -24,7 +24,7 @@
 
 #include glib-object.h
 
-G_BEGIN_DECLS;
+G_BEGIN_DECLS
 
 #define TYPE_WEBKIT_THUMBNAILER(webkit_thumbnailer_get_type ())
 #define WEBKIT_THUMBNAILER(obj)(G_TYPE_CHECK_INSTANCE_CAST ((obj), 
TYPE_WEBKIT_THUMBNAILER, WebkitThumbnailer))
@@ -39,6 +39,6 @@ typedef struct _WebkitThumbnailerWebkitThumbnailer;
 GType webkit_thumbnailer_get_type (void) G_GNUC_CONST;
 void  webkit_thumbnailer_register (TumblerProviderPlugin *plugin);
 
-G_END_DECLS;
+G_END_DECLS
 
 #endif /* !__WEBKIT_THUMBNAILER_H__ */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased Add more code comments.

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to 6f6facf272265e632d67a844e50f1a2858be5510 (commit)
   from f13862e36abebd924f557a690ecd603e54aa09e3 (commit)

commit 6f6facf272265e632d67a844e50f1a2858be5510
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat May 28 15:09:34 2011 +0200

Add more code comments.

 plugins/webkit-thumbnailer/webkit-thumbnailer.c |   15 +--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer.c 
b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
index 085ad88..cfff3cb 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer.c
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
@@ -104,13 +104,17 @@ cb_view_load_finished (GtkWidget *web_view,
WebKitWebFrame*web_frame,
WebkitThumbnailer *thumbnailer)
 {
+  /* force a redraw of the offscreen window to make sure we snapshot
+   * the latest visual changes */
   gtk_widget_queue_draw (web_view);
   gdk_window_process_updates (gtk_widget_get_window (thumbnailer-offscreen),
   TRUE);
 
+  /* snapshot the offscreen window */
   thumbnailer-tmp =
 gtk_offscreen_window_get_pixbuf (GTK_OFFSCREEN_WINDOW 
(thumbnailer-offscreen));
 
+  /* done, exit the main loop */
   gtk_main_quit ();
 }
 
@@ -123,6 +127,8 @@ webkit_thumbnailer_init (WebkitThumbnailer *thumbnailer)
 
   gtk_init (NULL, NULL);
 
+  /* the offscreen window will allow us to use a WebkitWebView to do all
+   * the rendering in the background, without actually displaying it */
   thumbnailer-offscreen = gtk_offscreen_window_new ();
   thumbnailer-view = webkit_web_view_new ();
   thumbnailer-tmp = NULL;
@@ -130,6 +136,7 @@ webkit_thumbnailer_init (WebkitThumbnailer *thumbnailer)
   /* create a new websettings and disable potential threats */
   settings = webkit_web_settings_new ();
 
+  /* disable plugins, javascript, java and html5 local features */
   g_object_set (G_OBJECT(settings),
 enable-scripts, FALSE,
 enable-plugins, FALSE,
@@ -142,7 +149,7 @@ webkit_thumbnailer_init (WebkitThumbnailer *thumbnailer)
   webkit_web_view_set_settings (WEBKIT_WEB_VIEW(thumbnailer-view),
 settings);
 
-  /* retrieve thumbnails once the page is loaded */
+  /* signal to retrieve thumbnails once the page is loaded */
   g_signal_connect (thumbnailer-view,
 load-finished,
 G_CALLBACK (cb_view_load_finished),
@@ -151,8 +158,11 @@ webkit_thumbnailer_init (WebkitThumbnailer *thumbnailer)
   gtk_container_add (GTK_CONTAINER (thumbnailer-offscreen),
  thumbnailer-view);
 
+  /* we need to set a size big enough for the html rendering to be
+   * relevant but not too big so that we don't manipulate huge pictures */
   gtk_widget_set_size_request (thumbnailer-offscreen, 1024, 1024);
 
+  /* this won't actually show anything as we use an offscreen window */
   gtk_widget_show_all (thumbnailer-offscreen);
 }
 
@@ -251,7 +261,8 @@ webkit_thumbnailer_create (TumblerAbstractThumbnailer 
*thumbnailer,
 
   uri = tumbler_file_info_get_uri (info);
 
-  /* schedule a timeout to avoid waiting forever */
+  /* schedule a timeout to avoid waiting forever if the page fails to
+   * load */
   timeout_id = g_timeout_add_seconds (LOAD_TIMEOUT, cb_load_timeout, NULL);
 
   /* load the page in the web view */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased Use Webkit document viewer cache model.

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to 99bb871d7859b4373d8ae287e49084b291152cba (commit)
   from 6f6facf272265e632d67a844e50f1a2858be5510 (commit)

commit 99bb871d7859b4373d8ae287e49084b291152cba
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Fri Jun 3 17:43:55 2011 +0200

Use Webkit document viewer cache model.

This will reduce the memory usage by using less aggressive caching which
we don't need.

 plugins/webkit-thumbnailer/webkit-thumbnailer.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer.c 
b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
index cfff3cb..e30559e 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer.c
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
@@ -136,6 +136,9 @@ webkit_thumbnailer_init (WebkitThumbnailer *thumbnailer)
   /* create a new websettings and disable potential threats */
   settings = webkit_web_settings_new ();
 
+  /* Set document viewer cache model to reduce memory usage */
+  webkit_set_cache_model (WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER);
+
   /* disable plugins, javascript, java and html5 local features */
   g_object_set (G_OBJECT(settings),
 enable-scripts, FALSE,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased Improve WebView settings.

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to 512b9a8ba933e7b5f965b3095c21ad05f0c3fc3b (commit)
   from 99bb871d7859b4373d8ae287e49084b291152cba (commit)

commit 512b9a8ba933e7b5f965b3095c21ad05f0c3fc3b
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Jun 4 11:42:47 2011 +0200

Improve WebView settings.

 plugins/webkit-thumbnailer/webkit-thumbnailer.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer.c 
b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
index e30559e..2a73a4e 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer.c
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
@@ -141,11 +141,14 @@ webkit_thumbnailer_init (WebkitThumbnailer *thumbnailer)
 
   /* disable plugins, javascript, java and html5 local features */
   g_object_set (G_OBJECT(settings),
-enable-scripts, FALSE,
-enable-plugins, FALSE,
+auto-resize-window, FALSE,
 enable-html5-database, FALSE,
 enable-html5-local-storage, FALSE,
 enable-java-applet, FALSE,
+enable-plugins, FALSE,
+enable-private-browsing, TRUE,
+enable-scripts, FALSE,
+enable-universal-access-from-file-uris, FALSE,
 NULL);
 
   /* apply the result to the web view */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased Use notify::load-status signal to handle page load.

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to 939e648a642fde446c3fe271edce1577e6d84232 (commit)
   from 8bbb1083e4c2d48fd6b32d2b630be523830569be (commit)

commit 939e648a642fde446c3fe271edce1577e6d84232
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Jun 4 14:26:48 2011 +0200

Use notify::load-status signal to handle page load.

This allows us to also handle errors on page loading which was not done
before.

 plugins/webkit-thumbnailer/webkit-thumbnailer.c |   38 +++---
 1 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer.c 
b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
index b0b6a02..f490dd9 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer.c
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
@@ -119,17 +119,31 @@ cb_view_loaded_idle (gpointer webkit_thumbnailer)
 
 
 static void
-cb_view_load_finished (GtkWidget *web_view,
-   WebKitWebFrame*web_frame,
-   WebkitThumbnailer *thumbnailer)
+cb_view_load_status (GtkWidget *web_view,
+ GParamSpec*pspec,
+ WebkitThumbnailer *thumbnailer)
 {
-  /* force a redraw of the offscreen window to make sure we snapshot
-   * the latest visual changes */
-  gtk_widget_queue_draw (thumbnailer-view);
-  gdk_window_process_updates (gtk_widget_get_window (thumbnailer-offscreen),
-  TRUE);
-
-  g_idle_add (cb_view_loaded_idle, thumbnailer);
+  switch (webkit_web_view_get_load_status (WEBKIT_WEB_VIEW (web_view)))
+{
+  case WEBKIT_LOAD_FINISHED:
+/* force a redraw of the offscreen window to make sure we snapshot
+ * the latest visual changes */
+gtk_widget_queue_draw (thumbnailer-view);
+gdk_window_process_updates (gtk_widget_get_window 
(thumbnailer-offscreen),
+TRUE);
+
+/* capture the web view content in an idle handler */
+g_idle_add (cb_view_loaded_idle, thumbnailer);
+break;
+
+  case WEBKIT_LOAD_FAILED:
+/* exit the main loop, an error will be returned */
+gtk_main_quit ();
+break;
+
+  default:
+break;
+}
 }
 
 
@@ -171,8 +185,8 @@ webkit_thumbnailer_init (WebkitThumbnailer *thumbnailer)
 
   /* signal to retrieve thumbnails once the page is loaded */
   g_signal_connect (thumbnailer-view,
-load-finished,
-G_CALLBACK (cb_view_load_finished),
+notify::load-status,
+G_CALLBACK (cb_view_load_status),
 thumbnailer);
 
   gtk_container_add (GTK_CONTAINER (thumbnailer-offscreen),
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased Move the capturing routine in a idle handler.

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to 42789b020901fb85d90899487e947e7cd049a16d (commit)
   from 45d54da553dcaebf2de100829f31bad9f973ca0d (commit)

commit 42789b020901fb85d90899487e947e7cd049a16d
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Jun 4 13:35:58 2011 +0200

Move the capturing routine in a idle handler.

 plugins/webkit-thumbnailer/webkit-thumbnailer.c |   28 +-
 1 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer.c 
b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
index f79dcfe..4314091 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer.c
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
@@ -99,6 +99,25 @@ webkit_thumbnailer_class_finalize (WebkitThumbnailerClass 
*klass)
 
 
 
+static gboolean
+cb_view_loaded_idle (gpointer webkit_thumbnailer)
+{
+  WebkitThumbnailer *thumbnailer;
+
+  thumbnailer = WEBKIT_THUMBNAILER (webkit_thumbnailer);
+
+  /* snapshot the offscreen window */
+  thumbnailer-tmp =
+gtk_offscreen_window_get_pixbuf (GTK_OFFSCREEN_WINDOW 
(thumbnailer-offscreen));
+
+  /* done, exit the main loop */
+  gtk_main_quit ();
+
+  return FALSE;
+}
+
+
+
 static void
 cb_view_load_finished (GtkWidget *web_view,
WebKitWebFrame*web_frame,
@@ -106,16 +125,11 @@ cb_view_load_finished (GtkWidget *web_view,
 {
   /* force a redraw of the offscreen window to make sure we snapshot
* the latest visual changes */
-  gtk_widget_queue_draw (web_view);
+  gtk_widget_queue_draw (thumbnailer-view);
   gdk_window_process_updates (gtk_widget_get_window (thumbnailer-offscreen),
   TRUE);
 
-  /* snapshot the offscreen window */
-  thumbnailer-tmp =
-gtk_offscreen_window_get_pixbuf (GTK_OFFSCREEN_WINDOW 
(thumbnailer-offscreen));
-
-  /* done, exit the main loop */
-  gtk_main_quit ();
+  g_idle_add (cb_view_loaded_idle, thumbnailer);
 }
 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased Stop loading when the timeout is elapsed.

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to 8bbb1083e4c2d48fd6b32d2b630be523830569be (commit)
   from 42789b020901fb85d90899487e947e7cd049a16d (commit)

commit 8bbb1083e4c2d48fd6b32d2b630be523830569be
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Jun 4 13:41:48 2011 +0200

Stop loading when the timeout is elapsed.

 plugins/webkit-thumbnailer/webkit-thumbnailer.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer.c 
b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
index 4314091..b0b6a02 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer.c
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
@@ -238,6 +238,8 @@ generate_pixbuf (GdkPixbuf *source,
 static gboolean
 cb_load_timeout (gpointer data)
 {
+  webkit_web_view_stop_loading (WEBKIT_WEB_VIEW (WEBKIT_THUMBNAILER 
(data)-view));
+
   gtk_main_quit ();
 
   return FALSE;
@@ -283,7 +285,8 @@ webkit_thumbnailer_create (TumblerAbstractThumbnailer 
*thumbnailer,
 
   /* schedule a timeout to avoid waiting forever if the page fails to
* load */
-  timeout_id = g_timeout_add_seconds (LOAD_TIMEOUT, cb_load_timeout, NULL);
+  timeout_id =
+g_timeout_add_seconds (LOAD_TIMEOUT, cb_load_timeout, webkit_thumbnailer);
 
   /* load the page in the web view */
   webkit_web_view_load_uri (WEBKIT_WEB_VIEW (webkit_thumbnailer-view), uri);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased webkit-thumbnailer should be linked against libmath.

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to d7896db89c174edd3217395a84391890b1dc28d3 (commit)
   from 939e648a642fde446c3fe271edce1577e6d84232 (commit)

commit d7896db89c174edd3217395a84391890b1dc28d3
Author: Jérémy Lal kapo...@melix.org
Date:   Sat Feb 16 18:11:11 2013 +0100

webkit-thumbnailer should be linked against libmath.

 plugins/webkit-thumbnailer/Makefile.am |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/plugins/webkit-thumbnailer/Makefile.am 
b/plugins/webkit-thumbnailer/Makefile.am
index 24c6668..d8b388f 100644
--- a/plugins/webkit-thumbnailer/Makefile.am
+++ b/plugins/webkit-thumbnailer/Makefile.am
@@ -54,7 +54,8 @@ tumbler_webkit_thumbnailer_la_LIBADD =
\
$(GDK_PIXBUF_LIBS)  \
$(GIO_LIBS) \
$(GLIB_LIBS)\
-   $(WEBKIT_LIBS)
+   $(WEBKIT_LIBS)  \
+   -lm
 
 tumbler_webkit_thumbnailer_la_DEPENDENCIES =   \
$(top_builddir)/tumbler/libtumbler-$(TUMBLER_VERSION_API).la
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased Fix weird EOF in line 252 after merge.

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to 9792232913e8c9e8a5d83f08ff716b5bec3d8a1d (commit)
   from d7896db89c174edd3217395a84391890b1dc28d3 (commit)

commit 9792232913e8c9e8a5d83f08ff716b5bec3d8a1d
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Feb 17 12:16:29 2013 +0100

Fix weird EOF in line 252 after merge.

 acinclude.m4 |   49 -
 1 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/acinclude.m4 b/acinclude.m4
index 93a5098..90a7fa5 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -244,29 +244,6 @@ AC_MSG_RESULT([$ac_tumbler_raw_thumbnailer])
 
 
 
-dnl TUMBLER_COVER_THUMBNAILER()
-dnl
-dnl Check whether to build and install the Open Movie Database thumbnailer 
plugin.
-dnl
-AC_DEFUN([TUMBLER_COVER_THUMBNAILER],
-[
-AC_ARG_ENABLE([cover-thumbnailer], 
[AC_HELP_STRING([--disable-cover-thumbnailer], [Don't build the Cover 
thumbnailer plugin])],
-  [ac_tumbler_cover_thumbnailer=$enableval], 
[ac_tumbler_cover_thumbnailer=yes])
-if test x$ac_tumbler_cover_thumbnailer = xyes; then
-  dnl Check for gdk-pixbuf
-  PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 = 2.14],
-  [
-dnl Check for curl
-PKG_CHECK_MODULES([CURL], [libcurl], [], [ac_tumbler_cover_thumbnailer=no])
-  ], [ac_tumbler_cover_thumbnailer=no])
-fi
-
-AC_MSG_CHECKING([whether to build the Cover thumbnailer plugin])
-AM_CONDITIONAL([TUMBLER_COVER_THUMBNAILER], [test 
x$ac_tumbler_cover_thumbnailer = xyes])
-AC_MSG_RESULT([$ac_tumbler_cover_thumbnailer])
-
-
-
 dnl TUMBLER_WEBKIT_THUMBNAILER()
 dnl
 dnl Check whether to build and install the Webkit HTML thumbnailer plugin.
@@ -291,6 +268,30 @@ AC_MSG_RESULT([$ac_tumbler_webkit_thumbnailer])
 
 
 
+dnl TUMBLER_COVER_THUMBNAILER()
+dnl
+dnl Check whether to build and install the Open Movie Database thumbnailer 
plugin.
+dnl
+AC_DEFUN([TUMBLER_COVER_THUMBNAILER],
+[
+AC_ARG_ENABLE([cover-thumbnailer], 
[AC_HELP_STRING([--disable-cover-thumbnailer], [Don't build the Cover 
thumbnailer plugin])],
+  [ac_tumbler_cover_thumbnailer=$enableval], 
[ac_tumbler_cover_thumbnailer=yes])
+if test x$ac_tumbler_cover_thumbnailer = xyes; then
+  dnl Check for gdk-pixbuf
+  PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 = 2.14],
+  [
+dnl Check for curl
+PKG_CHECK_MODULES([CURL], [libcurl], [], [ac_tumbler_cover_thumbnailer=no])
+  ], [ac_tumbler_cover_thumbnailer=no])
+fi
+
+AC_MSG_CHECKING([whether to build the Cover thumbnailer plugin])
+AM_CONDITIONAL([TUMBLER_COVER_THUMBNAILER], [test 
x$ac_tumbler_cover_thumbnailer = xyes])
+AC_MSG_RESULT([$ac_tumbler_cover_thumbnailer])
+])
+
+
+
 dnl TUMBLER_XDG_CACHE()
 dnl
 dnl Check whether to build and install the freedesktop.org cache plugin.
@@ -320,5 +321,3 @@ AC_MSG_CHECKING([whether to build the freedesktop.org cache 
plugin])
 AM_CONDITIONAL([TUMBLER_XDG_CACHE], [test x$ac_tumbler_xdg_cache = xyes])
 AC_MSG_RESULT([$ac_tumbler_xdg_cache])
 ])
-
-
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased Add WebkitThumbnailer to config file tumbler.rc

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to e50ddeaf6dc8d092bda80dc66b4a249716f84e6e (commit)
   from 9792232913e8c9e8a5d83f08ff716b5bec3d8a1d (commit)

commit e50ddeaf6dc8d092bda80dc66b4a249716f84e6e
Author: Jérémy Lal kapo...@melix.org
Date:   Sun Feb 17 12:39:58 2013 +0100

Add WebkitThumbnailer to config file tumbler.rc

 tumblerd/tumbler.rc |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tumblerd/tumbler.rc b/tumblerd/tumbler.rc
index 2563d8b..bade773 100644
--- a/tumblerd/tumbler.rc
+++ b/tumblerd/tumbler.rc
@@ -95,3 +95,10 @@ Disabled=false
 Priority=1
 Locations=
 MaxFileSize=0
+
+# Webkit thumbnailer
+[WebkitThumbnailer]
+Disabled=false
+Priority=1
+Locations=
+MaxFileSize=0
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer-rebased Let http scheme be handled by webkit-thumbnailer

2013-02-24 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer-rebased
 to e6363b5b8572ed0c39137a372c0926bdcfb86144 (commit)
   from e50ddeaf6dc8d092bda80dc66b4a249716f84e6e (commit)

commit e6363b5b8572ed0c39137a372c0926bdcfb86144
Author: Jérémy Lal kapo...@melix.org
Date:   Sun Feb 17 13:14:12 2013 +0100

Let http scheme be handled by webkit-thumbnailer

 tumbler/tumbler-util.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/tumbler/tumbler-util.c b/tumbler/tumbler-util.c
index 9d656d5..9296f34 100644
--- a/tumbler/tumbler-util.c
+++ b/tumbler/tumbler-util.c
@@ -64,7 +64,6 @@ tumbler_util_get_supported_uri_schemes (void)
   if (strcmp (file, vfs_schemes[i]) != 0 /* always first 
scheme */
strcmp (computer, vfs_schemes[i]) != 0  /* only devices 
here */
strcmp (localtest, vfs_schemes[i]) != 0 /* test fs */
-   strcmp (http, vfs_schemes[i]) != 0  /* not a fs you can 
browse */
strcmp (cdda, vfs_schemes[i]) != 0  /* audio cds */
strcmp (network, vfs_schemes[i]) != 0)  /* only to list 
remotes, not files */
 uri_schemes[n++] = g_strdup (vfs_schemes[i]);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] tumbler:jeromeg/webkit-thumbnailer webkit-thumbnailer should be linked against libmath.

2013-02-17 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/webkit-thumbnailer
 to 391fea21d5b9b575266bd359aa76b80c7c8afa63 (commit)
   from 9e139130c65f0324663496f01d3432b67902eb00 (commit)

commit 391fea21d5b9b575266bd359aa76b80c7c8afa63
Author: Jérémy Lal kapo...@melix.org
Date:   Sat Feb 16 18:11:11 2013 +0100

webkit-thumbnailer should be linked against libmath.

 plugins/webkit-thumbnailer/Makefile.am |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/plugins/webkit-thumbnailer/Makefile.am 
b/plugins/webkit-thumbnailer/Makefile.am
index 24c6668..d8b388f 100644
--- a/plugins/webkit-thumbnailer/Makefile.am
+++ b/plugins/webkit-thumbnailer/Makefile.am
@@ -54,7 +54,8 @@ tumbler_webkit_thumbnailer_la_LIBADD =
\
$(GDK_PIXBUF_LIBS)  \
$(GIO_LIBS) \
$(GLIB_LIBS)\
-   $(WEBKIT_LIBS)
+   $(WEBKIT_LIBS)  \
+   -lm
 
 tumbler_webkit_thumbnailer_la_DEPENDENCIES =   \
$(top_builddir)/tumbler/libtumbler-$(TUMBLER_VERSION_API).la
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Don't show escaped text in the shortcut conflict dialog (bug #5076).

2013-02-03 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 19f4d73d341330297a13c13781be0fbb3603b864 (commit)
   from 1b66b0d24f3c789e579f06c11d2ee90ac6515285 (commit)

commit 19f4d73d341330297a13c13781be0fbb3603b864
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Feb 3 11:41:24 2013 +0100

Don't show escaped text in the shortcut conflict dialog (bug #5076).

 libxfce4kbd-private/xfce-shortcuts.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcuts.c 
b/libxfce4kbd-private/xfce-shortcuts.c
index ecdf185..be5dd8f 100644
--- a/libxfce4kbd-private/xfce-shortcuts.c
+++ b/libxfce4kbd-private/xfce-shortcuts.c
@@ -127,11 +127,11 @@ xfce_shortcut_conflict_dialog (GtkWindow   *parent,
 
 /* We need to get the human readable string of the action name */
 owner_action_name =
-  g_markup_escape_text (xfce_shortcuts_xfwm4_get_feature_name 
(owner_action), -1);
+  g_strdup (xfce_shortcuts_xfwm4_get_feature_name (owner_action));
 
   }
 else
-  owner_action_name = g_markup_escape_text (owner_action, -1);
+  owner_action_name = g_strdup(owner_action);
 
 DBG (Owner action name: %s, owner_action_name);
 
@@ -142,16 +142,16 @@ xfce_shortcut_conflict_dialog (GtkWindow   *parent,
 /* We need to get the human readable string of the action name */
 
 other_action_name =
-  g_markup_escape_text (xfce_shortcuts_xfwm4_get_feature_name 
(other_action), -1);
+  g_strdup (xfce_shortcuts_xfwm4_get_feature_name (other_action));
 
   }
 else
-  other_action_name = g_markup_escape_text (other_action, -1);
+  other_action_name = g_strdup (other_action);
 
 secondary_text = g_strdup_printf (_(conflict_messages[i].message), 
other_action_name);
 
-owner_button_text = g_markup_printf_escaped 
(_(conflict_messages[i].owner_button_text), owner_action_name);
-other_button_text = g_markup_printf_escaped 
(_(conflict_messages[i].other_button_text), other_action_name);
+owner_button_text = g_strdup_printf 
(_(conflict_messages[i].owner_button_text), owner_action_name);
+other_button_text = g_strdup_printf 
(_(conflict_messages[i].other_button_text), other_action_name);
 
 response = xfce_message_dialog (parent, title, 
GTK_STOCK_DIALOG_QUESTION,
 title, secondary_text,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Fix some some shortcut comparisons with default shortcuts.

2013-02-03 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 76bcbd6e9de656552420c7b7f70a042f02c71917 (commit)
   from 19f4d73d341330297a13c13781be0fbb3603b864 (commit)

commit 76bcbd6e9de656552420c7b7f70a042f02c71917
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Feb 3 11:45:57 2013 +0100

Fix some some shortcut comparisons with default shortcuts.

As we compare the strings represeting the shortcuts, we need to set
default shortcuts to use the same string as the one resulting from GTK+
functions.

AltPrimary* shortcuts thus need to be changed to PrimaryAlt*.

 libxfce4kbd-private/xfce4-keyboard-shortcuts.xml |   22 +++---
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/libxfce4kbd-private/xfce4-keyboard-shortcuts.xml 
b/libxfce4kbd-private/xfce4-keyboard-shortcuts.xml
index 2b1507e..aca0fd6 100644
--- a/libxfce4kbd-private/xfce4-keyboard-shortcuts.xml
+++ b/libxfce4kbd-private/xfce4-keyboard-shortcuts.xml
@@ -41,19 +41,19 @@
   property name=lt;Altgt;F11 type=string value=fullscreen_key/
   property name=lt;Altgt;F12 type=string value=above_key/
   property name=lt;Primarygt;lt;Shiftgt;lt;Altgt;Left 
type=string value=move_window_left_key/
-  property name=lt;Altgt;lt;Primarygt;End type=string 
value=move_window_next_workspace_key/
-  property name=lt;Altgt;lt;Primarygt;Home type=string 
value=move_window_prev_workspace_key/
+  property name=lt;Primarygt;lt;Altgt;End type=string 
value=move_window_next_workspace_key/
+  property name=lt;Primarygt;lt;Altgt;Home type=string 
value=move_window_prev_workspace_key/
   property name=lt;Primarygt;lt;Shiftgt;lt;Altgt;Right 
type=string value=move_window_right_key/
   property name=lt;Primarygt;lt;Shiftgt;lt;Altgt;Up type=string 
value=move_window_up_key/
-  property name=lt;Altgt;lt;Primarygt;KP_1 type=string 
value=move_window_workspace_1_key/
-  property name=lt;Altgt;lt;Primarygt;KP_2 type=string 
value=move_window_workspace_2_key/
-  property name=lt;Altgt;lt;Primarygt;KP_3 type=string 
value=move_window_workspace_3_key/
-  property name=lt;Altgt;lt;Primarygt;KP_4 type=string 
value=move_window_workspace_4_key/
-  property name=lt;Altgt;lt;Primarygt;KP_5 type=string 
value=move_window_workspace_5_key/
-  property name=lt;Altgt;lt;Primarygt;KP_6 type=string 
value=move_window_workspace_6_key/
-  property name=lt;Altgt;lt;Primarygt;KP_7 type=string 
value=move_window_workspace_7_key/
-  property name=lt;Altgt;lt;Primarygt;KP_8 type=string 
value=move_window_workspace_8_key/
-  property name=lt;Altgt;lt;Primarygt;KP_9 type=string 
value=move_window_workspace_9_key/
+  property name=lt;Primarygt;lt;Altgt;KP_1 type=string 
value=move_window_workspace_1_key/
+  property name=lt;Primarygt;lt;Altgt;KP_2 type=string 
value=move_window_workspace_2_key/
+  property name=lt;Primarygt;lt;Altgt;KP_3 type=string 
value=move_window_workspace_3_key/
+  property name=lt;Primarygt;lt;Altgt;KP_4 type=string 
value=move_window_workspace_4_key/
+  property name=lt;Primarygt;lt;Altgt;KP_5 type=string 
value=move_window_workspace_5_key/
+  property name=lt;Primarygt;lt;Altgt;KP_6 type=string 
value=move_window_workspace_6_key/
+  property name=lt;Primarygt;lt;Altgt;KP_7 type=string 
value=move_window_workspace_7_key/
+  property name=lt;Primarygt;lt;Altgt;KP_8 type=string 
value=move_window_workspace_8_key/
+  property name=lt;Primarygt;lt;Altgt;KP_9 type=string 
value=move_window_workspace_9_key/
   property name=lt;Altgt;space type=string value=popup_menu_key/
   property name=lt;Shiftgt;lt;Altgt;Page_Up type=string 
value=raise_window_key/
   property name=lt;Primarygt;lt;Altgt;Right type=string 
value=right_workspace_key/
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfwm4:master Fix invalid markups in French translation.

2013-02-03 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 081735baef42439530cbc1ba7322b58d4db90a7c (commit)
   from b2b9bbc8f87885cf5df29d08ab77d9eb2c180a60 (commit)

commit 081735baef42439530cbc1ba7322b58d4db90a7c
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Feb 3 11:55:49 2013 +0100

Fix invalid markups in French translation.

 po/fr.po |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/po/fr.po b/po/fr.po
index 89dbfde..a3a0928 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -127,7 +127,7 @@ msgstr bModèle de focalisation/b
 
 #: ../settings-dialogs/xfwm4-dialog.glade.h:4
 msgid bHide content of windows/b
-msgstr bCacher le contenu des fenêtres/ b
+msgstr bCacher le contenu des fenêtres/b
 
 #: ../settings-dialogs/xfwm4-dialog.glade.h:5
 msgid bNew window focus/b
@@ -160,7 +160,7 @@ msgstr bAimantation des fenêtres/b
 #: ../settings-dialogs/xfwm4-dialog.glade.h:12
 msgid bWrap workspaces when reaching the screen edge/b
 msgstr 
-Changer d'espace de travail lorsque le _pointeur arrive au bord de l'écran
+bChanger d'espace de travail lorsque le pointeur arrive au bord de 
l'écran/b
 
 #. Raise focus delay
 #: ../settings-dialogs/xfwm4-dialog.glade.h:14
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Update NEWS.

2013-01-19 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 7ad839783d3a5c597e90454a829c0e495bb70fb1 (commit)
   from 6a678089aeb43432ac6aa0eaf7408ea749907fe7 (commit)

commit 7ad839783d3a5c597e90454a829c0e495bb70fb1
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Fri Jan 18 22:27:55 2013 +0100

Update NEWS.

 NEWS |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index 2165537..17ca979 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,8 @@ Version 0.2.3git:
   span attributes missused by some clients and to parse strings with
   unusual caracters such as  (bug #7773, #8187).
 * Respect border-width when drawing the notification (bug #9475).
+* Do not kill notification daemon to apply new theme. Instead, handle
+  style updates of existing notifications.
 
 Version 0.2.2 (06 August 2011):
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Add test for body markup.

2013-01-19 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 21fa7774a3d79b71064d7756564f4b09bbeac096 (commit)
   from 7ad839783d3a5c597e90454a829c0e495bb70fb1 (commit)

commit 21fa7774a3d79b71064d7756564f4b09bbeac096
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Jan 19 11:36:44 2013 +0100

Add test for body markup.

 tests/test-text.c |   19 +++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/tests/test-text.c b/tests/test-text.c
index 700d4f4..7500cb2 100644
--- a/tests/test-text.c
+++ b/tests/test-text.c
@@ -68,5 +68,24 @@ int main (int argc, char **argv)
 
   g_object_unref (notification);
 
+  g_print (%s, Testing notification with markup in the body\n);
+
+  notification = notify_notification_new (Markup support,
+  iItalic/i\n
+  bBold/b\n
+  uUnderlined/u\n
+  a 
href=\http://www.xfce.org\;Xfce Web site/a,
+  NULL);
+
+  if (!notify_notification_show (notification, NULL))
+{
+  g_error (Failed);
+  g_object_unref (notification);
+
+  return EXIT_FAILURE;
+}
+
+  g_object_unref (notification);
+
   return EXIT_SUCCESS;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master The daemon no longer needs to be killed on theme update.

2013-01-18 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to ceeb76b26a5d3e652ae5cd638bfe16ecfe0d68f4 (commit)
   from d9ab1de0f0d0d5e44a777b80e3b68f738dc5a04d (commit)

commit ceeb76b26a5d3e652ae5cd638bfe16ecfe0d68f4
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Fri Jan 18 19:43:54 2013 +0100

The daemon no longer needs to be killed on theme update.

This is a bit tricky but far cleaner than killing the daemon.

 xfce4-notifyd-config/main.c|   24 --
 xfce4-notifyd/main.c   |   28 +
 xfce4-notifyd/xfce-notify-daemon.c |   39 ---
 3 files changed, 63 insertions(+), 28 deletions(-)

diff --git a/xfce4-notifyd-config/main.c b/xfce4-notifyd-config/main.c
index 13bba2d..d3a4726 100644
--- a/xfce4-notifyd-config/main.c
+++ b/xfce4-notifyd-config/main.c
@@ -38,29 +38,6 @@
 
 #include xfce4-notifyd-config.ui.h
 
-/* unfortunately, currently we have to kill the daemon to
- * change themes.  this is only annoying because existing notifications
- * will get killed */
-static void
-xfce4_notifyd_config_kill_daemon(void)
-{
-DBusGConnection *dbus_conn;
-DBusGProxy *proxy;
-
-dbus_conn = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
-if(!dbus_conn)
-return;
-
-proxy = dbus_g_proxy_new_for_name(dbus_conn,
-  org.freedesktop.Notifications,
-  /org/freedesktop/Notifications,
-  org.xfce.Notifyd);
-dbus_g_proxy_call_no_reply(proxy, Quit, G_TYPE_INVALID);
-
-g_object_unref(G_OBJECT(proxy));
-dbus_g_connection_unref(dbus_conn);
-}
-
 static gchar *
 xfce4_notifyd_slider_format_value(GtkScale *slider,
   gdouble value,
@@ -115,7 +92,6 @@ xfce4_notifyd_config_theme_changed(XfconfChannel *channel,
 gtk_combo_box_set_active_iter(GTK_COMBO_BOX(theme_combo),
   iter);
 g_free(theme);
-xfce4_notifyd_config_kill_daemon();
 
 /* TRANSLATORS: notify-send is a command name in the following 
string,
  * it must not be translated. */
diff --git a/xfce4-notifyd/main.c b/xfce4-notifyd/main.c
index a755b10..8fab30a 100644
--- a/xfce4-notifyd/main.c
+++ b/xfce4-notifyd/main.c
@@ -25,6 +25,8 @@
 #include string.h
 #endif
 
+#include glib/gstdio.h
+
 #include gtk/gtk.h
 
 #include xfconf/xfconf.h
@@ -39,8 +41,30 @@ main(int argc,
 {
 XfceNotifyDaemon *xndaemon;
 GError *error = NULL;
+gchar  *temp_theme_file;
 
 xfconf_init(NULL);
+
+/* For theming we need to rely on a trick.
+ *
+ * We can't use gtk_rc_parse to parse theme files because if we do
+ * so they get added to the list of rc files for Gtk widgets. Then,
+ * the next time you update the theme and parse a new GtkRc file,
+ * you still have the old values if the new theme does not override
+ * them.
+ *
+ * Thus, we create a temp file that we add to the list of default
+ * GtkRc files. This file will only contain an include to the actual
+ * theme file. That way we only have to call gtk_rc_reparse_all to
+ * update notifications' style.
+ *
+ * This has to be done before gtk_init. */
+
+temp_theme_file = g_build_path(G_DIR_SEPARATOR_S, g_get_user_cache_dir(),
+   xfce4-notifyd-theme.rc, NULL);
+
+gtk_rc_add_default_file(temp_theme_file);
+
 gtk_init(argc, argv);
 
 xfce_textdomain(GETTEXT_PACKAGE, LOCALEDIR, UTF-8);
@@ -69,6 +93,10 @@ main(int argc,
 
 gtk_main();
 
+/* Remove the temp file for themes */
+g_unlink(temp_theme_file);
+g_free(temp_theme_file);
+
 g_object_unref(G_OBJECT(xndaemon));
 
 return 0;
diff --git a/xfce4-notifyd/xfce-notify-daemon.c 
b/xfce4-notifyd/xfce-notify-daemon.c
index 3c02712..ec2972a 100644
--- a/xfce4-notifyd/xfce-notify-daemon.c
+++ b/xfce4-notifyd/xfce-notify-daemon.c
@@ -1119,23 +1119,54 @@ static void
 xfce_notify_daemon_set_theme(XfceNotifyDaemon *xndaemon,
  const gchar *theme)
 {
-gchar *file, **files;
+GError *error = NULL;
+gchar  *file, **files;
+gchar  *string;
+gchar  *temp_theme_file;
+
+DBG(New theme: %s, theme);
+
+/* See main.c for an explanation on how the theming works and why
+ * we use this temp file including the real file */
+
+temp_theme_file = g_build_path(G_DIR_SEPARATOR_S, g_get_user_cache_dir(),
+   xfce4-notifyd-theme.rc, NULL);
 
 /* old-style ~/.themes ... */
 file = g_build_filename(xfce_get_homedir(), .themes, theme,
 xfce-notify-4.0, gtkrc, NULL);
 if(g_file_test(file, G_FILE_TEST_EXISTS)) {
-gtk_rc_parse(file);
+string = g_strconcat(include \, file, \, NULL);
+if (!g_file_set_contents (temp_theme_file, string, -1, error

[Xfce4-commits] xfce4-notifyd:master Remove close button.

2013-01-18 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to b748af876c1510fd2b36d0a18cefc5b08260c010 (commit)
   from ceeb76b26a5d3e652ae5cd638bfe16ecfe0d68f4 (commit)

commit b748af876c1510fd2b36d0a18cefc5b08260c010
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Fri Jan 18 21:56:46 2013 +0100

Remove close button.

Clicking anywhere in the notification dismisses it, so there is no real
notification for having it.

 xfce4-notifyd/xfce-notify-window.c |   64 
 1 files changed, 0 insertions(+), 64 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index bf307da..15206d0 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -53,8 +53,6 @@ struct _XfceNotifyWindow
 
 gboolean mouse_hover;
 cairo_path_t *bg_path;
-cairo_path_t *close_btn_path;
-GdkRegion *close_btn_region;
 
 gdouble normal_opacity;
 
@@ -322,16 +320,6 @@ xfce_notify_window_unrealize(GtkWidget *widget)
 cairo_path_destroy(window-bg_path);
 window-bg_path = NULL;
 }
-
-if(window-close_btn_path) {
-cairo_path_destroy(window-close_btn_path);
-window-close_btn_path = NULL;
-}
-
-if(window-close_btn_region) {
-gdk_region_destroy(window-close_btn_region);
-window-close_btn_region = NULL;
-}
 }
 
 static inline GdkRegion *
@@ -507,22 +495,15 @@ xfce_notify_window_expose(GtkWidget *widget,
 }
 }
 
-
 if(window-mouse_hover) {
 GdkColor *border_color = NULL;
 gdouble border_width = DEFAULT_BORDER_WIDTH;
 
-/* this secifies the padding from the edges in order to make sure the
- * border completely fits into the dranwing area */
-gdouble padding = 0.0;
-
 gtk_widget_style_get(widget,
  border-color, border_color,
  border-width, border_width,
  NULL);
 
-padding = border_width / 2.0;
-
 cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
 if(border_color)
 gdk_cairo_set_source_color(cr, border_color);
@@ -531,32 +512,6 @@ xfce_notify_window_expose(GtkWidget *widget,
 cairo_set_line_width(cr, border_width);
 
 cairo_stroke(cr);
-
-/* draw a circle with an X in it */
-if(!window-close_btn_path) {
-cairo_path_t *flat_path;
-GdkFillRule fill_rule;
-
-cairo_arc(cr, widget-allocation.width - 12.0 - padding, 12.0 + 
padding, 7.5, 0., 2*M_PI);
-window-close_btn_path = cairo_copy_path(cr);
-
-flat_path = cairo_copy_path_flat(cr);
-fill_rule = (cairo_get_fill_rule(cr) == CAIRO_FILL_RULE_WINDING
- ? GDK_WINDING_RULE : GDK_EVEN_ODD_RULE);
-window-close_btn_region = 
xfce_gdk_region_from_cairo_flat_path(flat_path,
-
fill_rule);
-cairo_path_destroy(flat_path);
-} else
-cairo_append_path(cr, window-close_btn_path);
-cairo_set_line_width(cr, 1.5);
-cairo_stroke(cr);
-
-cairo_move_to(cr, widget-allocation.width - 8.0 - padding, 8.0 + 
padding);
-cairo_line_to(cr, widget-allocation.width - 16.0 - padding, 16.0 + 
padding);
-cairo_stroke(cr);
-cairo_move_to(cr, widget-allocation.width - 16.0 - padding, 8.0 + 
padding);
-cairo_line_to(cr, widget-allocation.width - 8.0 - padding, 16.0 + 
padding);
-cairo_stroke(cr);
 }
 
 cairo_destroy(cr);
@@ -604,15 +559,6 @@ static gboolean
 xfce_notify_window_button_release(GtkWidget *widget,
   GdkEventButton *evt)
 {
-XfceNotifyWindow *window = XFCE_NOTIFY_WINDOW(widget);
-
-if(!window-close_btn_region
-   || !gdk_region_point_in(window-close_btn_region, evt-x, evt-y))
-{
-g_signal_emit(G_OBJECT(widget), signals[SIG_ACTION_INVOKED], 0,
-  default);
-}
-
 g_signal_emit(G_OBJECT(widget), signals[SIG_CLOSED], 0,
   XFCE_NOTIFY_CLOSE_REASON_DISMISSED);
 
@@ -634,16 +580,6 @@ xfce_notify_window_configure_event(GtkWidget *widget,
 window-bg_path = NULL;
 }
 
-if(window-close_btn_path) {
-cairo_path_destroy(window-close_btn_path);
-window-close_btn_path = NULL;
-}
-
-if(window-close_btn_region) {
-gdk_region_destroy(window-close_btn_region);
-window-close_btn_region = NULL;
-}
-
 gtk_widget_queue_draw(widget);
 
 return ret;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Add notification configuration dialog to the personnal settings category.

2013-01-18 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 323feb3083a200217c88068dbf9e1943dd2b66a2 (commit)
   from b748af876c1510fd2b36d0a18cefc5b08260c010 (commit)

commit 323feb3083a200217c88068dbf9e1943dd2b66a2
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Fri Jan 18 22:02:26 2013 +0100

Add notification configuration dialog to the personnal settings category.

 .../xfce4-notifyd-config.desktop.in|2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xfce4-notifyd-config/xfce4-notifyd-config.desktop.in 
b/xfce4-notifyd-config/xfce4-notifyd-config.desktop.in
index 609a5f3..9fa3ac2 100644
--- a/xfce4-notifyd-config/xfce4-notifyd-config.desktop.in
+++ b/xfce4-notifyd-config/xfce4-notifyd-config.desktop.in
@@ -8,5 +8,5 @@ Terminal=false
 StartupNotify=true
 Type=Application
 OnlyShowIn=XFCE;
-Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;
+Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-PersonalSettings;
 X-XfcePluggable=true
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Fix body with markup, don't escape text...

2013-01-18 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 02cdaaeb34b6e2af12c09a9716b9f83035baef46 (commit)
   from 323feb3083a200217c88068dbf9e1943dd2b66a2 (commit)

commit 02cdaaeb34b6e2af12c09a9716b9f83035baef46
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Fri Jan 18 22:16:27 2013 +0100

Fix body with markup, don't escape text...

If we escape the text before setting it as a label markup, we see the
tag strings... Thanks to Parole notifications for triggering this!

 xfce4-notifyd/xfce-notify-window.c |8 ++--
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index 15206d0..557b9c2 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -740,14 +740,10 @@ xfce_notify_window_set_body(XfceNotifyWindow *window,
 g_return_if_fail(XFCE_IS_NOTIFY_WINDOW(window));
 
 if(body  *body) {
-gchar *markup = g_markup_escape_text (body, -1);
-if(!markup)
-return;
-
-gtk_label_set_markup(GTK_LABEL(window-body), markup);
+gtk_label_set_markup(GTK_LABEL(window-body), body);
 
 gtk_widget_show(window-body);
-g_free(markup);
+
 window-has_body_text = TRUE;
 } else {
 gtk_label_set_markup(GTK_LABEL(window-body), );
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Drop AC_PROG_LIBTOOL (bug #6920).

2013-01-12 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 03e18b4a8bf1feb21ef55750c26610724bc59094 (commit)
   from 4c91ffd263f00e8063e7b59b33055ed347445c3a (commit)

commit 03e18b4a8bf1feb21ef55750c26610724bc59094
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Mon Dec 10 12:08:18 2012 +0100

Drop AC_PROG_LIBTOOL (bug #6920).

 NEWS|9 -
 configure.ac.in |3 ++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 743b4b8..fd5d2eb 100644
--- a/NEWS
+++ b/NEWS
@@ -4,8 +4,15 @@
 
 Version 0.2.3git:
 
-* Fix notifications not disappearing after clicking an action button.
+  Features:
 * Add a category to the settings dialog for Xfce4 Settings Manager.
+* Add widget names to summary (summary) and body (body) widgets
+  to allow easier theming. Remove the redundant / buggy summary-bold
+  style property (bug #8431).
+  Themes will have to be updated accordingly.
+
+  Bugs fixed:
+* Fix notifications not disappearing after clicking an action button.
 * Handle timeout correctly when smaller than fading time (bug #8580).
 * Parse body with g_markup_escape_text which allows us to handle
   span attributes missused by some clients and to parse strings with
diff --git a/configure.ac.in b/configure.ac.in
index 26f17d1..a4f32d8 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -45,7 +45,8 @@ AM_PROG_CC_C_O()
 AC_PROG_LD()
 AC_PROG_INSTALL()
 AC_PROG_INTLTOOL()
-AC_PROG_LIBTOOL()
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
 
 dnl check for standard header files
 AC_HEADER_STDC()
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-screenshooter:master Use a define for background transparency.

2013-01-12 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 469a8ec930a41ce2958e7c1cf8e4fee0764b59ad (commit)
   from 93848f14ffcb8f42ca27d2ad09ebea3b4bb33a63 (commit)

commit 469a8ec930a41ce2958e7c1cf8e4fee0764b59ad
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 8 16:09:50 2012 +0100

Use a define for background transparency.

 NEWS|6 ++
 lib/screenshooter-capture.c |6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 5a6fd30..4c0af1a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+=== Version x.x.x ===
+
+  * Enhancements:
+- Make region selection with compositing on more usable on darker
+  backgrounds (bug #9592).
+
 === Version 1.8.1 ===
 
   * Enhancements:
diff --git a/lib/screenshooter-capture.c b/lib/screenshooter-capture.c
index 92e6f1b..f4e6e92 100644
--- a/lib/screenshooter-capture.c
+++ b/lib/screenshooter-capture.c
@@ -19,7 +19,7 @@
 
 #include screenshooter-capture.h
 
-
+#define BACKGROUND_TRANSPARENCY 0.4
 
 /* Rubberband data for composited environment */
 typedef struct
@@ -523,7 +523,7 @@ static gboolean cb_expose (GtkWidget *widget,
   for (i = 0; i  n_rects; ++i)
 {
   /* Restore the transparent background */
-  cairo_set_source_rgba (cr, 0, 0, 0, 0.4);
+  cairo_set_source_rgba (cr, 0, 0, 0, BACKGROUND_TRANSPARENCY);
   gdk_cairo_rectangle (cr, rects[i]);
   cairo_fill (cr);
 
@@ -548,7 +548,7 @@ static gboolean cb_expose (GtkWidget *widget,
 
   /* Draw the transparent background */
   cr = gdk_cairo_create (GDK_DRAWABLE (widget-window));
-  cairo_set_source_rgba (cr, 0, 0, 0, 0.4);
+  cairo_set_source_rgba (cr, 0, 0, 0, BACKGROUND_TRANSPARENCY);
   cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
 
   for (i = 0; i  n_rects; ++i)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-notifyd:master Respect border-width when drawing the notification (bug #9475).

2013-01-12 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to d9ab1de0f0d0d5e44a777b80e3b68f738dc5a04d (commit)
   from 03e18b4a8bf1feb21ef55750c26610724bc59094 (commit)

commit d9ab1de0f0d0d5e44a777b80e3b68f738dc5a04d
Author: Dinkel din...@pimprecords.com
Date:   Sat Jan 12 17:51:42 2013 +0100

Respect border-width when drawing the notification (bug #9475).

Add a border-width / 2 padding when drawing so that the whole border is
drawable in the drawing area. Previously big border values would cause
only half of the border to be drawn.

 NEWS   |1 +
 xfce4-notifyd/xfce-notify-window.c |   45 
 2 files changed, 31 insertions(+), 15 deletions(-)

diff --git a/NEWS b/NEWS
index fd5d2eb..2165537 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ Version 0.2.3git:
 * Parse body with g_markup_escape_text which allows us to handle
   span attributes missused by some clients and to parse strings with
   unusual caracters such as  (bug #7773, #8187).
+* Respect border-width when drawing the notification (bug #9475).
 
 Version 0.2.2 (06 August 2011):
 
diff --git a/xfce4-notifyd/xfce-notify-window.c 
b/xfce4-notifyd/xfce-notify-window.c
index 0459f40..bf307da 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -399,6 +399,12 @@ xfce_notify_window_ensure_bg_path(XfceNotifyWindow *window,
 {
 GtkWidget *widget = GTK_WIDGET(window);
 gdouble radius = DEFAULT_RADIUS;
+gdouble border_width = DEFAULT_BORDER_WIDTH;
+
+/* this secifies the padding from the edges in order to make
+ * sure the border completely fits into the drawing area */
+gdouble padding = 0.0;
+
 cairo_path_t *flat_path;
 GdkRegion *region;
 GdkFillRule fill_rule;
@@ -411,24 +417,27 @@ xfce_notify_window_ensure_bg_path(XfceNotifyWindow 
*window,
 
 gtk_widget_style_get(widget,
  border-radius, radius,
+ border-width, border_width,
  NULL);
 
+padding = border_width / 2.0;
+
 if(radius  0.1) {
 cairo_rectangle(cr, 0, 0, widget-allocation.width,
 widget-allocation.height);
 } else {
-cairo_move_to(cr, 0, radius);
-cairo_arc(cr, radius, radius, radius, M_PI, 3.0*M_PI/2.0);
-cairo_line_to(cr, widget-allocation.width - radius, 0);
-cairo_arc(cr, widget-allocation.width - radius, radius, radius,
+cairo_move_to(cr, padding, radius + padding);
+cairo_arc(cr, radius + padding, radius + padding, radius, M_PI, 
3.0*M_PI/2.0);
+cairo_line_to(cr, widget-allocation.width - radius - padding, 
padding);
+cairo_arc(cr, widget-allocation.width - radius - padding, radius + 
padding, radius,
   3.0*M_PI/2.0, 0.0);
-cairo_line_to(cr, widget-allocation.width,
-  widget-allocation.height - radius);
-cairo_arc(cr, widget-allocation.width - radius,
-  widget-allocation.height - radius, radius,
+cairo_line_to(cr, widget-allocation.width - padding,
+  widget-allocation.height - radius - padding);
+cairo_arc(cr, widget-allocation.width - radius - padding,
+  widget-allocation.height - radius - padding, radius,
   0.0, M_PI/2.0);
-cairo_line_to(cr, radius, widget-allocation.height);
-cairo_arc(cr, radius, widget-allocation.height - radius, radius,
+cairo_line_to(cr, radius + padding, widget-allocation.height - 
padding);
+cairo_arc(cr, radius + padding, widget-allocation.height - radius - 
padding, radius,
   M_PI/2.0, M_PI);
 cairo_close_path(cr);
 }
@@ -503,11 +512,17 @@ xfce_notify_window_expose(GtkWidget *widget,
 GdkColor *border_color = NULL;
 gdouble border_width = DEFAULT_BORDER_WIDTH;
 
+/* this secifies the padding from the edges in order to make sure the
+ * border completely fits into the dranwing area */
+gdouble padding = 0.0;
+
 gtk_widget_style_get(widget,
  border-color, border_color,
  border-width, border_width,
  NULL);
 
+padding = border_width / 2.0;
+
 cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
 if(border_color)
 gdk_cairo_set_source_color(cr, border_color);
@@ -522,7 +537,7 @@ xfce_notify_window_expose(GtkWidget *widget,
 cairo_path_t *flat_path;
 GdkFillRule fill_rule;
 
-cairo_arc(cr, widget-allocation.width - 12., 12., 7.5, 0., 
2*M_PI);
+cairo_arc(cr, widget-allocation.width - 12.0 - padding, 12.0 + 
padding, 7.5, 0., 2*M_PI);
 window-close_btn_path = cairo_copy_path(cr);
 
 flat_path = cairo_copy_path_flat(cr);
@@ -536,11 +551,11 @@ xfce_notify_window_expose(GtkWidget *widget,
  

[Xfce4-commits] xfwm4:master Fix duplicated accelerators in French translation.

2012-12-31 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 9c1998f4ebac4fa402d3add09f4942283878482e (commit)
   from b87299b22d59b3cb5b278f7ee0978f771aa30f38 (commit)

commit 9c1998f4ebac4fa402d3add09f4942283878482e
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Mon Dec 31 09:06:53 2012 +0100

Fix duplicated accelerators in French translation.

 po/fr.po |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/po/fr.po b/po/fr.po
index 4762065..89dbfde 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -4,7 +4,7 @@
 # Olivier Fourdan four...@xfce.org, 2002-2006.
 # Maximilian Schleiss maximil...@xfce.org, 2006-2008.
 # Mike Massonnet mmasson...@xfce.org, 2008.
-# 
+#
 msgid 
 msgstr 
 Project-Id-Version: xfwm4\n
@@ -655,7 +655,7 @@ msgstr _Restaurer
 
 #: ../src/menu.c:45
 msgid Mi_nimize
-msgstr _Réduire
+msgstr Réd_uire
 
 #: ../src/menu.c:46
 msgid Minimize _All Other Windows
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


  1   2   3   4   5   6   7   8   9   10   >