[Xfce4-commits] xfce4-terminal:master Drop report bug menu entry.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to e2ef16c1b036391879248ae9be69414307849284 (commit)
   from d01160cd84ac98e5059d1665aec97bbbf4876882 (commit)

commit e2ef16c1b036391879248ae9be69414307849284
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 09:50:14 2012 +0100

Drop report bug menu entry.

 terminal/terminal-window-ui.xml |1 -
 terminal/terminal-window.c  |   13 -
 2 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/terminal/terminal-window-ui.xml b/terminal/terminal-window-ui.xml
index a03602a..df562ed 100644
--- a/terminal/terminal-window-ui.xml
+++ b/terminal/terminal-window-ui.xml
@@ -55,7 +55,6 @@
 /menu
 menu action=help-menu
   menuitem action=contents/
-  menuitem action=report-bug/
   menuitem action=about/
 /menu
   /menubar
diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 5062b69..04be378 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -184,8 +184,6 @@ static void
terminal_window_action_reset_and_clear(GtkAction
   
TerminalWindow *window);
 static voidterminal_window_action_contents   
(GtkAction  *action,
   
TerminalWindow *window);
-static voidterminal_window_action_report_bug 
(GtkAction  *action,
-  
TerminalWindow *window);
 static voidterminal_window_action_about  
(GtkAction  *action,
   
TerminalWindow *window);
 
@@ -226,7 +224,6 @@ static const GtkActionEntry action_entries[] =
 { move-tab-right, NULL, N_ (Move Tab _Right), NULL, NULL, G_CALLBACK 
(terminal_window_action_move_tab_right), },
   { help-menu, NULL, N_ (_Help), NULL, NULL, NULL, },
 { contents, GTK_STOCK_HELP, N_ (_Contents), F1, N_ (Display help 
contents), G_CALLBACK (terminal_window_action_contents), },
-{ report-bug, NULL, N_ (_Report a bug), NULL, NULL, G_CALLBACK 
(terminal_window_action_report_bug), },
 { about, GTK_STOCK_ABOUT, N_ (_About), NULL, NULL, G_CALLBACK 
(terminal_window_action_about), },
   { input-methods, NULL, N_ (_Input Methods), NULL, NULL, NULL, },
 };
@@ -1781,16 +1778,6 @@ terminal_window_action_reset_and_clear (GtkAction   
*action,
 
 
 static void
-terminal_window_action_report_bug (GtkAction   *action,
-   TerminalWindow  *window)
-{
-  /* open the Support section of the user manual */
-  xfce_dialog_show_help (GTK_WINDOW (window), terminal, support, NULL);
-}
-
-
-
-static void
 terminal_window_action_contents (GtkAction   *action,
  TerminalWindow  *window)
 {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:jeromeg/keyboard-shortcuts Primary and Control now conflict.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/keyboard-shortcuts
 to 084d79c43fa7bbb5c284808927a99808d85dc925 (commit)
   from a8c6cd3340203a7229746116e294bbf3a0dc713b (commit)

commit 084d79c43fa7bbb5c284808927a99808d85dc925
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] xfce4-settings:jeromeg/keyboard-shortcuts Remove ignore_property argument in xfce_keyboard_settings_get_shortcut_info.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/keyboard-shortcuts
 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 files 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] libxfce4ui:jeromeg/keyboard-shortcuts Don't get the default display a second time.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/keyboard-shortcuts
 to 53a93d33534af5b17317487aad531dcce0c4bc60 (commit)
   from 084d79c43fa7bbb5c284808927a99808d85dc925 (commit)

commit 53a93d33534af5b17317487aad531dcce0c4bc60
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 a7632fa..a035fb4 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:jeromeg/keyboard-shortcuts Grab on all root windows when building with GTK+ 3.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/keyboard-shortcuts
 to b9f459f6c28796d5140b2a75b4ce05f108214716 (commit)
   from 53a93d33534af5b17317487aad531dcce0c4bc60 (commit)

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

Grab on all root windows when building with GTK+ 3.

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

diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c 
b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index a035fb4..211b606 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -311,7 +311,7 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
 
 #if GTK_CHECK_VERSION (3, 0, 0)
   /* Retrieve the root window of the screen */
-  root_window = gdk_x11_get_default_root_xwindow ();
+  root_window = GDK_WINDOW_XID (gdk_screen_get_root_window 
(gdk_display_get_screen (display, j)));
 #else
   /* Retrieve the root window of the screen */
   root_window = GDK_WINDOW_XWINDOW (gdk_screen_get_root_window 
(gdk_display_get_screen (display, j)));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfwm4:jeromeg/keyboard-shortcuts Fix compiler warning.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/jeromeg/keyboard-shortcuts
 to d2f828e9ee673bd5857852b77666e8949b7d9ac0 (commit)
   from f609df3f73f1e7a4c7659b2b20ed3e043aa9f2e7 (commit)

commit d2f828e9ee673bd5857852b77666e8949b7d9ac0
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 11:16:38 2012 +0100

Fix compiler warning.

 settings-dialogs/xfwm4-settings.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/settings-dialogs/xfwm4-settings.c 
b/settings-dialogs/xfwm4-settings.c
index 88cc9d5..e621141 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -1767,12 +1767,10 @@ xfwm_settings_shortcut_edit_clicked (GtkButton
*button,
   GtkTreeSelection *selection;
   GtkTreeModel *model;
   GtkTreePath  *path;
-  GtkTreeIter   tree_iter;
   GtkWidget*view;
   GList*rows;
   GList*iter;
   GList*row_references = NULL;
-  gchar*shortcut;
 
   g_return_if_fail (XFWM_IS_SETTINGS (settings));
   g_return_if_fail (GTK_IS_BUILDER (settings-priv-builder));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] mousepad:master Fix compiler warning.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to 084e1ecac5b111aec765fbefc77616fb116eb7cc (commit)
   from b7b6571427a17f8343bda5810f9a830be2c0775a (commit)

commit 084e1ecac5b111aec765fbefc77616fb116eb7cc
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 11:34:55 2012 +0100

Fix compiler warning.

 mousepad/main.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/mousepad/main.c b/mousepad/main.c
index 22e69eb..6eb20ee 100644
--- a/mousepad/main.c
+++ b/mousepad/main.c
@@ -84,9 +84,11 @@ main (gint argc, gchar **argv)
   g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
 #endif
 
+#if !GLIB_CHECK_VERSION (2, 30, 0)
   /* initialize the gthread system */
   if (G_LIKELY (!g_thread_supported ()))
 g_thread_init (NULL);
+#endif
 
   /* initialize gtk+ */
   if (!gtk_init_with_args (argc, argv, _([FILES...]), (GOptionEntry *) 
option_entries, (gchar *) GETTEXT_PACKAGE, error))
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] mousepad:master Lowercase the desktop file name.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to 7f3f075b22a884d1b40393ef6d99c250ee2539fb (commit)
   from f363acf7d7211a0b4d7bb6b8c18c7d6597ba6b85 (commit)

commit 7f3f075b22a884d1b40393ef6d99c250ee2539fb
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 11:47:09 2012 +0100

Lowercase the desktop file name.

 Makefile.am|2 +-
 Mousepad.desktop.in.in |   13 -
 2 files changed, 1 insertions(+), 14 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index e9a885a..9f9eabc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,7 +22,7 @@ MousepadHelp: MousepadHelp.in Makefile
 
 desktopdir = $(datadir)/applications
 desktop_in_in_files =  
\
-   Mousepad.desktop.in.in
+   mousepad.desktop.in.in
 desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
 %.desktop.in: %.desktop.in.in
sed -e s,\@libexecdir\@,$(libexecdir),g  $  $@
diff --git a/Mousepad.desktop.in.in b/Mousepad.desktop.in.in
deleted file mode 100644
index 21fda29..000
--- a/Mousepad.desktop.in.in
+++ /dev/null
@@ -1,13 +0,0 @@
-
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Mousepad
-_Comment=Simple Text Editor
-_GenericName=Text Editor
-Exec=mousepad %F
-Icon=accessories-text-editor
-Terminal=false
-StartupNotify=true
-Type=Application
-Categories=Application;Utility;TextEditor;GTK;
-MimeType=text/plain
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] mousepad:master Remove docs and cleanup a bit.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to f363acf7d7211a0b4d7bb6b8c18c7d6597ba6b85 (commit)
   from 084e1ecac5b111aec765fbefc77616fb116eb7cc (commit)

commit f363acf7d7211a0b4d7bb6b8c18c7d6597ba6b85
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 11:46:29 2012 +0100

Remove docs and cleanup a bit.

 AUTHORS |6 +
 AUTHORS-pre-0.3.0   |3 -
 ChangeLog-pre-0.3.0 |   54 ---
 Makefile.am |   11 +-
 MousepadHelp.in |   29 +--
 configure.ac.in |   17 -
 docs/Makefile.am|4 -
 docs/manual/C/Makefile.am   |   66 
 docs/manual/C/Mousepad.xml.in   |  478 ---
 docs/manual/C/images/Makefile.am|   15 -
 docs/manual/C/images/find-and-replace.png   |  Bin 20777 - 0 bytes
 docs/manual/C/images/go-to.png  |  Bin 9507 - 0 bytes
 docs/manual/C/images/main-window.png|  Bin 13955 - 0 bytes
 docs/manual/C/images/other-tab-size.png |  Bin 8168 - 0 bytes
 docs/manual/C/images/paste-from-history.png |  Bin 9495 - 0 bytes
 docs/manual/C/images/tab-size-menu.png  |  Bin 9130 - 0 bytes
 docs/manual/C/images/typeahead-search.png   |  Bin 6724 - 0 bytes
 docs/manual/Makefile.am |   12 -
 docs/manual/mousepad.css|   99 --
 docs/manual/mousepad.xsl|  254 --
 20 files changed, 10 insertions(+), 1038 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index fefc28d..1c9c987 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -2,3 +2,9 @@ Erik Harrison erikharri...@xfce.org
 Nick Schermer n...@xfce.org
 Benedikt Meurer be...@xfce.org
 Matthew Brush m...@xfce.org
+
+Authors of the 0.2 and earlier releases
+===
+Erik Harrison erikharri...@xfce.org
+Benedikt Meurer be...@xfce.org
+Tarot Osuji ta...@sdf.lonestar.org
diff --git a/AUTHORS-pre-0.3.0 b/AUTHORS-pre-0.3.0
deleted file mode 100644
index 1c0188e..000
--- a/AUTHORS-pre-0.3.0
+++ /dev/null
@@ -1,3 +0,0 @@
-Erik Harrison erikharri...@xfce.org
-Benedikt Meurer be...@xfce.org
-Tarot Osuji ta...@sdf.lonestar.org
diff --git a/ChangeLog-pre-0.3.0 b/ChangeLog-pre-0.3.0
deleted file mode 100644
index 001d89b..000
--- a/ChangeLog-pre-0.3.0
+++ /dev/null
@@ -1,54 +0,0 @@
-2009-02-26  Jannis Pohlmann jan...@xfce.org
-
-   * == Released 0.2.16 ==
-   * NEWS, configure.in.in: Bump version.
-   * src/menu.c, NEWS: Sort items by most recently used.
-
-2008-02-13  Nick Schermer n...@xfce.org
-
-   * src/menu.c, NEWS: Sort items by most recently used.
-
-2007-01-20 Benedikt Meurer be...@xfce.org
-
-   * configure.in.in: Post-release version bump.
-
-2007-01-20 Benedikt Meurer be...@xfce.org
-
-   * === Released 0.2.12 ===
-   * NEWS, configure.in.in: Bump version.
-   * po/*.po: Update Project-Id-Version.
-
-2007-01-15 Erik Harrison erikharri...@xfce.org
-
-   * src/: Moving undo system changes from local tree to Xfce svn, and
- resuming work there.
-
-2006-11-04 Benedikt Meurer be...@xfce.org
-
-   * AUTHORS, src/callback.{c,h}, src/file.c, src/menu.c: Merge the
- support for the new recently-used database, using the GtkRecent
- functionality, available in GTK+ 2.10 and later, instead of the
- planned libfrap module.
-
-2006-11-04 Benedikt Meurer be...@xfce.org
-
-   * src/selector.c(create_file_chooser): Apply patch from Nick Schermer
- n...@xfce.org to set default response in the open/save file dialogs
- so hitting enter opens/saves the file. Bug #2249.
-
-2006-11-04 Benedikt Meurer be...@xfce.org
-
-   * configure.in.in: Post-release version bump.
-   * src/window.c: Add root warning. Bug #2245.
-   * po/mousepad.pot, po/*.po: Merge new strings.
-   * po/de.po: Updated german translations.
-
-2006-11-04 Benedikt Meurer be...@xfce.org
-
-   * === Released 0.2.10 ===
-   * NEWS, configure.in.in: Bump version.
-   * po/*.po: Update Project-Id-Version.
-   * README, NEWS: Place news for Leafpad users as Switching from
- Leafpad into the README file.
-
-# vi:set ts=8 sw=8 noet ai nocindent:
diff --git a/Makefile.am b/Makefile.am
index 25a1d67..e9a885a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,15 +1,13 @@
 SUBDIRS =  
\
icons   
\
mousepad
\
-   po  
\
-   docs
+   po
 
 distclean-local:
rm -rf *.spec *.cache *~
 
-rpm: dist
-   rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz
-   @rm -f $(PACKAGE)-$(VERSION).tar.gz

[Xfce4-commits] mousepad:master Hardcoded help location to docs.xfce.org.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to 2c8a3873cadb4a7ab799480f32113cf9de5afaaf (commit)
   from 0194fadcf4cbbe15e1da6643073a9fc3d7f6b084 (commit)

commit 2c8a3873cadb4a7ab799480f32113cf9de5afaaf
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 11:50:50 2012 +0100

Hardcoded help location to docs.xfce.org.

Should use the function in 4ui for this, but that's for later.

 Makefile.am |   13 
 MousepadHelp.in |   68 ---
 mousepad/mousepad-dialogs.c |   33 +++-
 3 files changed, 5 insertions(+), 109 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 788fedf..ad568bb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,17 +9,6 @@ distclean-local:
 distuninstallcheck_listfiles = 
\ 
find . -type f -print | grep -v ./share/icons/hicolor/icon-theme.cache
 
-mousepad_scriptsdir = $(libdir)/xfce4/mousepad
-mousepad_scripts_SCRIPTS = 
\
-   MousepadHelp
-
-MousepadHelp: MousepadHelp.in Makefile
-   rm -f MousepadHelp.gen MousepadHelp
-   sed -e s,\@datadir\@,$(datadir),g 
\
-$(srcdir)/MousepadHelp.in 
\
-MousepadHelp.gen
-   mv MousepadHelp.gen MousepadHelp
-
 desktopdir = $(datadir)/applications
 desktop_in_in_files =  
\
mousepad.desktop.in.in
@@ -39,14 +28,12 @@ ChangeLog: Makefile
 dist-hook: ChangeLog
 
 EXTRA_DIST =   
\
-   MousepadHelp.in 
\
intltool-extract.in 
\
intltool-merge.in   
\
intltool-update.in  
\
$(desktop_in_in_files)
 
 DISTCLEANFILES =   
\
-   MousepadHelp
\
intltool-extract
\
intltool-merge  
\
intltool-update 
\
diff --git a/MousepadHelp.in b/MousepadHelp.in
deleted file mode 100644
index c6322f5..000
--- a/MousepadHelp.in
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2004-2006 Benedikt Meurer be...@xfce.org
-# Copyright (c) 2007  Nick Schermer n...@xfce.org
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-
-APPLICATIONS=exo-open firefox epiphany opera galeon mozilla konqueror dillo
-
-URL=http://docs.xfce.org;
-
-# find a suitable browser to launch if no BROWSER variable is set
-if [ x$BROWSER = x ]; then
-  for i in $APPLICATIONS; do
-# find the application in the path
-testapp=$(which $i 2/dev/null)
-if test -f $testapp; then
-  # use the application and break
-  BROWSER=$i
-  break
-fi
-  done
-fi
-
-# tell the use if no suitable browser was found
-if [ x$BROWSER = x ]; then
-  # print warning and leave
-  echo MousepadHelp: Could not find a browser to use. Please set the BROWSER 
variable.
-  exit 1
-fi
-
-# run the browser
-case $BROWSER in
-  exo-open)
-$BROWSER --launch WebBrowser $URL
-  ;;
-  opera*)
-$BROWSER -remote openURL\($URL,new-window\) || $BROWSER $URL
-  ;;
-  firefox*)
-$BROWSER -a firefox -remote openurl\($URL,new-window\) || $BROWSER $URL
-  ;;
-  communicator*|netscape|mozilla*|phoenix*|firebird*)
-$BROWSER -remote openurl\($URL,new-window\) || $BROWSER $URL
-  ;;
-  *)
-$BROWSER $URL;
-  ;;
-esac
-
-# leave
-exit 0
-
-# vim:set ts=2 sw=2 et ai:
-
diff --git a/mousepad/mousepad-dialogs.c b/mousepad/mousepad-dialogs.c
index f5d4ccd..f1ab29d 100644
--- a/mousepad/mousepad-dialogs.c
+++ b/mousepad/mousepad-dialogs.c
@@ -86,10 +86,9 @@ mousepad_dialogs_show_help (GtkWindow   *parent,
 const gchar *page,
 const gchar *offset)
 {
-  GdkScreen *screen;
-  GError  

[Xfce4-commits] mousepad:master Add missing file, update configure.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to 7c4be0e6d6971c69aec31a8287afcfe7658c32e2 (commit)
   from 2c8a3873cadb4a7ab799480f32113cf9de5afaaf (commit)

commit 7c4be0e6d6971c69aec31a8287afcfe7658c32e2
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 11:56:42 2012 +0100

Add missing file, update configure.

 configure.ac.in|5 +++--
 mousepad.desktop.in.in |   13 +
 po/POTFILES.in |2 +-
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 29b72e8..640e498 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -27,7 +27,7 @@ AC_REVISION([])
 dnl ***
 dnl *** Initialize automake ***
 dnl ***
-AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar])
+AM_INIT_AUTOMAKE([1.8 no-dist-gzip dist-bzip2 tar-ustar])
 AM_CONFIG_HEADER([config.h])
 AM_MAINTAINER_MODE()
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -52,7 +52,8 @@ AC_CHECK_PROGS([PERL], [perl5 perl])
 dnl **
 dnl *** Initialize libtool ***
 dnl **
-AC_PROG_LIBTOOL()
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
 
 dnl **
 dnl *** Substitute version information ***
diff --git a/mousepad.desktop.in.in b/mousepad.desktop.in.in
new file mode 100644
index 000..21fda29
--- /dev/null
+++ b/mousepad.desktop.in.in
@@ -0,0 +1,13 @@
+
+[Desktop Entry]
+Encoding=UTF-8
+_Name=Mousepad
+_Comment=Simple Text Editor
+_GenericName=Text Editor
+Exec=mousepad %F
+Icon=accessories-text-editor
+Terminal=false
+StartupNotify=true
+Type=Application
+Categories=Application;Utility;TextEditor;GTK;
+MimeType=text/plain
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5b130ed..cf290f4 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -23,4 +23,4 @@ mousepad/mousepad-window.c
 #
 # Desktop Files
 #
-Mousepad.desktop.in.in
+mousepad.desktop.in.in
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] mousepad:master Remove spec file.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to 0194fadcf4cbbe15e1da6643073a9fc3d7f6b084 (commit)
   from 7f3f075b22a884d1b40393ef6d99c250ee2539fb (commit)

commit 0194fadcf4cbbe15e1da6643073a9fc3d7f6b084
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 11:47:57 2012 +0100

Remove spec file.

 Makefile.am  |4 +---
 Mousepad.spec.in |   49 -
 2 files changed, 1 insertions(+), 52 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 9f9eabc..788fedf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,7 @@ SUBDIRS =   
\
po
 
 distclean-local:
-   rm -rf *.spec *.cache *~
+   rm -rf *.cache *~
 
 distuninstallcheck_listfiles = 
\ 
find . -type f -print | grep -v ./share/icons/hicolor/icon-theme.cache
@@ -40,7 +40,6 @@ dist-hook: ChangeLog
 
 EXTRA_DIST =   
\
MousepadHelp.in 
\
-   Mousepad.spec.in
\
intltool-extract.in 
\
intltool-merge.in   
\
intltool-update.in  
\
@@ -48,7 +47,6 @@ EXTRA_DIST =  
\
 
 DISTCLEANFILES =   
\
MousepadHelp
\
-   Mousepad.spec   
\
intltool-extract
\
intltool-merge  
\
intltool-update 
\
diff --git a/Mousepad.spec.in b/Mousepad.spec.in
deleted file mode 100644
index 6261c2c..000
--- a/Mousepad.spec.in
+++ /dev/null
@@ -1,49 +0,0 @@
-Summary:   Mousepad Text Editor
-Name:  @PACKAGE_TARNAME@
-Version:   @PACKAGE_VERSION@
-Release:   1
-License:   GPL
-URL:   http://www.xfce.org/
-Source0:   %{name}-%{version}.tar.gz
-Group: Applications/X11
-BuildRoot: %{_tmppath}/%{name}-root
-Requires:  gtk2 = @GTK_REQUIRED_VERSION@
-BuildRequires: gtk2-devel = @GTK_REQUIRED_VERSION@
-
-%description
-Mousepad is a simple text editor for the Xfce Desktop Environment.
-
-%prep
-%setup -q
-
-%build
-%configure --enable-dbus --enable-final --enable-xsltproc
-make
-
-%install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir}
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%post
-update-desktop-database  /dev/null ||:
-touch --no-create %{_datadir}/icons/hicolor || :
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
-
-%postun
-update-desktop-database  /dev/null ||:
-touch --no-create %{_datadir}/icons/hicolor || :
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
-
-%files
-%defattr(-,root,root)
-%doc AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS TODO
-%{_bindir}/
-%{_datadir}/
-%{_libexecdir}/
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] mousepad:master Drop icons, it uses accessories-text-editor.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to 8742e37ba35931541c83856203956cb5919488c7 (commit)
   from 7c4be0e6d6971c69aec31a8287afcfe7658c32e2 (commit)

commit 8742e37ba35931541c83856203956cb5919488c7
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 12:00:10 2012 +0100

Drop icons, it uses accessories-text-editor.

 Makefile.am |4 -
 configure.ac.in |4 -
 icons/16x16/Makefile.am |   13 -
 icons/16x16/Mousepad.png|  Bin 574 - 0 bytes
 icons/24x24/Makefile.am |   13 -
 icons/24x24/Mousepad.png|  Bin 972 - 0 bytes
 icons/Makefile.am   |   19 --
 icons/scalable/Makefile.am  |   13 -
 icons/scalable/Mousepad.svg |  552 ---
 mousepad/main.c |2 +-
 mousepad/mousepad-window.c  |3 -
 11 files changed, 1 insertions(+), 622 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index ad568bb..1c251d5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,14 +1,10 @@
 SUBDIRS =  
\
-   icons   
\
mousepad
\
po
 
 distclean-local:
rm -rf *.cache *~
 
-distuninstallcheck_listfiles = 
\ 
-   find . -type f -print | grep -v ./share/icons/hicolor/icon-theme.cache
-
 desktopdir = $(datadir)/applications
 desktop_in_in_files =  
\
mousepad.desktop.in.in
diff --git a/configure.ac.in b/configure.ac.in
index 640e498..1595d44 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -117,10 +117,6 @@ AC_SUBST([PLATFORM_LDFLAGS])
 
 AC_OUTPUT([
 Makefile
-icons/Makefile
-icons/16x16/Makefile
-icons/24x24/Makefile
-icons/scalable/Makefile
 mousepad/Makefile
 po/Makefile.in
 ])
diff --git a/icons/16x16/Makefile.am b/icons/16x16/Makefile.am
deleted file mode 100644
index a8e5cb7..000
--- a/icons/16x16/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-iconsdir = $(datadir)/icons/hicolor/16x16/apps
-icons_DATA =   \
-   Mousepad.png
-
-# install symlink
-install-data-local:
-   $(mkinstalldirs) $(DESTDIR)$(iconsdir)
-   -( cd $(DESTDIR)$(iconsdir) ; ln -sf Mousepad.png 
accessories-text-editor.png )
-
-EXTRA_DIST =   \
-   $(icons_DATA)
-
-# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/icons/16x16/Mousepad.png b/icons/16x16/Mousepad.png
deleted file mode 100644
index 188e1c1..000
Binary files a/icons/16x16/Mousepad.png and /dev/null differ
diff --git a/icons/24x24/Makefile.am b/icons/24x24/Makefile.am
deleted file mode 100644
index c22ae68..000
--- a/icons/24x24/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-iconsdir = $(datadir)/icons/hicolor/24x24/apps
-icons_DATA =   \
-   Mousepad.png
-
-# install symlink
-install-data-local:
-   $(mkinstalldirs) $(DESTDIR)$(iconsdir)
-   -( cd $(DESTDIR)$(iconsdir) ; ln -sf Mousepad.png 
accessories-text-editor.png )
-
-EXTRA_DIST =   \
-   $(icons_DATA)
-
-# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/icons/24x24/Mousepad.png b/icons/24x24/Mousepad.png
deleted file mode 100644
index bdbb88e..000
Binary files a/icons/24x24/Mousepad.png and /dev/null differ
diff --git a/icons/Makefile.am b/icons/Makefile.am
deleted file mode 100644
index 21932ab..000
--- a/icons/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-SUBDIRS =  \
-   16x16   \
-   24x24   \
-   scalable
-
-gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
-
-install-data-hook:
-   @-if test -z $(DESTDIR); then \
-echo Updating Gtk icon cache.;   \
-$(gtk_update_icon_cache);  \
-else   \
-echo *** Icon cache not updated. Remember to run:;   \
-   echo ***; \
-echo ***   $(gtk_update_icon_cache); \
-   echo ***; \
-fi
-
-# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/icons/scalable/Makefile.am b/icons/scalable/Makefile.am
deleted file mode 100644
index 2beabc7..000
--- a/icons/scalable/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-iconsdir = $(datadir)/icons/hicolor/scalable/apps
-icons_DATA = 

[Xfce4-commits] mousepad:master Old news file only contained translation release.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to d6b4ae93b6422447f6b31421b4686e2330848ae2 (commit)
   from 8742e37ba35931541c83856203956cb5919488c7 (commit)

commit d6b4ae93b6422447f6b31421b4686e2330848ae2
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 12:02:10 2012 +0100

Old news file only contained translation release.

 NEWS-pre-0.3.0 |   29 -
 1 files changed, 0 insertions(+), 29 deletions(-)

diff --git a/NEWS-pre-0.3.0 b/NEWS-pre-0.3.0
deleted file mode 100644
index 2251371..000
--- a/NEWS-pre-0.3.0
+++ /dev/null
@@ -1,29 +0,0 @@
-0.2.16
-==
-- Sort recently used items by most recently used.
-- Updated translations: sl, gl, it, zh_CN, pl, cs, sv, da, ja, es, nb,
--  eu, sq, de, pt_BR, id, sk, ku, lv, nl, am, si, pt_PT, fr, ur, ca, 
--  en_GB, tr, uk, ko, ar, el.
-
-
-0.2.12
-==
-- Add support for the new recently-used database, using the GtkRecent
-  functionality available in GTK+ 2.10 and later.
-- Set default response in Open/Save dialogs (Bug #2249).
-- Merge new undo system.
-- Updated translations: Carles Muñoz Gorriz (ca), Michal Várady (cz), Benedikt
-Meurer (de), Stavros Giannouris (el), Piarres Beobide
-   (eu), Jari Rahkonen (fi), Maximilian Schleiss (fr),
-   ByungHyun Choi (ko), Piotr Maliński (pl), Adriano
-   Winter Bess (pt_BR), Andrey Fedoseev (ru), Alexander
-   Toresson (sv)
-- New translations: Alexander Nyakhaychyk (be), Geraint Rowlands (cy), Tome
-Boshevski (mk), A S Alam (pa)
-
-
-0.2.10
-==
-- Updated translations: Pau Rul-lan Ferragut (ca), ByungHyun Choi (ko),
-   Szymon Kałasz (pl), Daniel Nylander (sv)
-- New translations: Wangmo Sherpa (dz)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] mousepad:master Automagically provided by distcheck.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to 6736663b132180012508e33b505dcf2e2ec83689 (commit)
   from d6b4ae93b6422447f6b31421b4686e2330848ae2 (commit)

commit 6736663b132180012508e33b505dcf2e2ec83689
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 12:02:33 2012 +0100

Automagically provided by distcheck.

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

diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index 095b1eb..000
--- a/INSTALL
+++ /dev/null
@@ -1,231 +0,0 @@
-Installation Instructions
-*
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free
-Software Foundation, Inc.
-
-This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==
-
-These are generic installation instructions.
-
-   The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  (Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.)
-
-   If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
-
-The simplest way to compile this package is:
-
-  1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.  If you're
- using `csh' on an old version of System V, you might need to type
- `sh ./configure' instead to prevent `csh' from trying to execute
- `configure' itself.
-
- Running `configure' takes awhile.  While running, it prints some
- messages telling which features it is checking for.
-
-  2. Type `make' to compile the package.
-
-  3. Optionally, type `make check' to run any self-tests that come with
- the package.
-
-  4. Type `make install' to install the programs and any data files and
- documentation.
-
-  5. You can remove the program binaries and object files from the
- source code directory by typing `make clean'.  To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'.  There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers.  If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
-Compilers and Options
-=
-
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about.  Run `./configure --help' for
-details on some of the pertinent environment variables.
-
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
-
- ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
-
-   *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-
-
-You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
-   If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory.  After you have installed the
-package for one architecture, use `make distclean' before 

[Xfce4-commits] mousepad:master Update version for release.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to 93f6b72ebefe552fae19457436c32796616bc2ba (commit)
   from 6736663b132180012508e33b505dcf2e2ec83689 (commit)

commit 93f6b72ebefe552fae19457436c32796616bc2ba
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 12:03:54 2012 +0100

Update version for release.

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

diff --git a/configure.ac.in b/configure.ac.in
index 1595d44..97cc765 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -6,7 +6,7 @@ m4_define([mousepad_version_minor], [3])
 m4_define([mousepad_version_micro], [0])
 m4_define([mousepad_version_nano], []) dnl leave this empty to have no nano 
version
 m4_define([mousepad_version_build], [@REVISION@])
-m4_define([mousepad_version_tag], [git])
+m4_define([mousepad_version_tag], [])
 m4_define([mousepad_version], 
[mousepad_version_major().mousepad_version_minor().mousepad_version_micro()ifelse(mousepad_version_nano(),
 [], [], [.mousepad_version_nano()])ifelse(mousepad_version_tag(), [git], 
[mousepad_version_tag()-mousepad_version_build()], [mousepad_version_tag()])])
 
 dnl ***
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] mousepad:master Post release tag bump.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to ac49e64653935da8ed70f8e1d135fd86fe10a85b (commit)
   from 93f6b72ebefe552fae19457436c32796616bc2ba (commit)

commit ac49e64653935da8ed70f8e1d135fd86fe10a85b
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 12:07:01 2012 +0100

Post release tag bump.

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

diff --git a/configure.ac.in b/configure.ac.in
index 97cc765..1595d44 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -6,7 +6,7 @@ m4_define([mousepad_version_minor], [3])
 m4_define([mousepad_version_micro], [0])
 m4_define([mousepad_version_nano], []) dnl leave this empty to have no nano 
version
 m4_define([mousepad_version_build], [@REVISION@])
-m4_define([mousepad_version_tag], [])
+m4_define([mousepad_version_tag], [git])
 m4_define([mousepad_version], 
[mousepad_version_major().mousepad_version_minor().mousepad_version_micro()ifelse(mousepad_version_nano(),
 [], [], [.mousepad_version_nano()])ifelse(mousepad_version_tag(), [git], 
[mousepad_version_tag()-mousepad_version_build()], [mousepad_version_tag()])])
 
 dnl ***
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] mousepad|mousepad-0.3.0 Creating annotated tag mousepad-0.3.0

2012-12-30 Thread Nick Schermer
Updating annotated tag refs/tags/mousepad-0.3.0
 as new annotated tag
 to 5ae52fe0191ac52a5059f106ff759c5a42109dd1 (tag)
   succeeds legacy-319-g6736663
  tagged by Nick Schermer n...@xfce.org
 on 2012-12-30 12:06 +0100

Nick Schermer (1):
  Update version for release.

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


[Xfce4-commits] mousepad:master Fix desktop file.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to bd725ea7e5fdce6887c00bc4d78be3e3938340e9 (commit)
   from ac49e64653935da8ed70f8e1d135fd86fe10a85b (commit)

commit bd725ea7e5fdce6887c00bc4d78be3e3938340e9
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 12:24:30 2012 +0100

Fix desktop file.

 mousepad.desktop.in.in |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/mousepad.desktop.in.in b/mousepad.desktop.in.in
index 21fda29..96ca08d 100644
--- a/mousepad.desktop.in.in
+++ b/mousepad.desktop.in.in
@@ -1,6 +1,5 @@
 
 [Desktop Entry]
-Encoding=UTF-8
 _Name=Mousepad
 _Comment=Simple Text Editor
 _GenericName=Text Editor
@@ -9,5 +8,5 @@ Icon=accessories-text-editor
 Terminal=false
 StartupNotify=true
 Type=Application
-Categories=Application;Utility;TextEditor;GTK;
-MimeType=text/plain
+Categories=Utility;TextEditor;GTK;
+MimeType=text/plain;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-terminal:master Fix window resizing with animations enabled.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to b0e9ada613dc6283f99ab1f05bf2bb65198e7c65 (commit)
   from e2ef16c1b036391879248ae9be69414307849284 (commit)

commit b0e9ada613dc6283f99ab1f05bf2bb65198e7c65
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 12:40:09 2012 +0100

Fix window resizing with animations enabled.

 terminal/terminal-window-dropdown.c |   28 
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/terminal/terminal-window-dropdown.c 
b/terminal/terminal-window-dropdown.c
index 8f5950a..4eff5b0 100644
--- a/terminal/terminal-window-dropdown.c
+++ b/terminal/terminal-window-dropdown.c
@@ -617,21 +617,25 @@ static void
 terminal_window_dropdown_show (TerminalWindowDropdown *dropdown,
guint32 timestamp)
 {
-  TerminalWindow *window = TERMINAL_WINDOW (dropdown);
-  gintw, h;
-  GdkRectanglemonitor_geo;
-  gintx_dest, y_dest;
-  gintxpad, ypad;
-  glong   char_width, char_height;
-  GtkRequisition  req1, req2;
-  gbooleanmove_to_active;
-  gbooleanvisible;
-  gintviewport_h;
+  TerminalWindow*window = TERMINAL_WINDOW (dropdown);
+  gint   w, h;
+  GdkRectangle   monitor_geo;
+  gint   x_dest, y_dest;
+  gint   xpad, ypad;
+  glong  char_width, char_height;
+  GtkRequisition req1, req2;
+  gboolean   move_to_active;
+  gboolean   visible;
+  gint   viewport_h;
+  TerminalDirection  old_animation_dir = ANIMATION_DIR_NONE;
 
   visible = gtk_widget_get_visible (GTK_WIDGET (dropdown));
 
   if (dropdown-animation_timeout_id != 0)
-g_source_remove (dropdown-animation_timeout_id);
+{
+  old_animation_dir = dropdown-animation_dir;
+  g_source_remove (dropdown-animation_timeout_id);
+}
 
   g_object_get (G_OBJECT (window-preferences),
 dropdown-move-to-active, move_to_active,
@@ -689,7 +693,7 @@ terminal_window_dropdown_show (TerminalWindowDropdown 
*dropdown,
   /* start animation collapsed */
   viewport_h = 0;
 }
-  else
+  else if (old_animation_dir == ANIMATION_DIR_UP)
 {
   /* pick up where we aborted */
   gtk_widget_size_request (dropdown-viewport, req1);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-terminal:master Add idle to check for focus out event with keybindings.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to 8c0abbdb486744577067fe326f45efdb6d79b399 (commit)
   from b0e9ada613dc6283f99ab1f05bf2bb65198e7c65 (commit)

commit 8c0abbdb486744577067fe326f45efdb6d79b399
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 12:56:17 2012 +0100

Add idle to check for focus out event with keybindings.

 terminal/terminal-window-dropdown.c |   55 +++
 1 files changed, 49 insertions(+), 6 deletions(-)

diff --git a/terminal/terminal-window-dropdown.c 
b/terminal/terminal-window-dropdown.c
index 4eff5b0..5c1a6dd 100644
--- a/terminal/terminal-window-dropdown.c
+++ b/terminal/terminal-window-dropdown.c
@@ -118,6 +118,9 @@ struct _TerminalWindowDropdown
   /* ui widgets */
   GtkWidget   *keep_open;
 
+  /* idle for detecting focus out during grabs (Alt+Tab) */
+  guintgrab_timeout_id;
+
   /* measurements */
   gdouble  rel_width;
   gdouble  rel_height;
@@ -386,6 +389,9 @@ terminal_window_dropdown_finalize (GObject *object)
 {
   TerminalWindowDropdown *dropdown = TERMINAL_WINDOW_DROPDOWN (object);
 
+  if (dropdown-grab_timeout_id != 0)
+g_source_remove (dropdown-grab_timeout_id);
+
   if (dropdown-animation_timeout_id != 0)
 g_source_remove (dropdown-animation_timeout_id);
 
@@ -406,18 +412,51 @@ terminal_window_dropdown_focus_in_event (GtkWidget 
*widget,
   /* unset */
   dropdown-focus_out_time = 0;
 
+  /* stop a possible grab test */
+  if (dropdown-grab_timeout_id != 0)
+g_source_remove (dropdown-grab_timeout_id);
+
   return (*GTK_WIDGET_CLASS 
(terminal_window_dropdown_parent_class)-focus_in_event) (widget, event);;
 }
 
 
 
 static gboolean
+terminal_window_dropdown_can_grab (gpointer data)
+{
+  TerminalWindowDropdown *dropdown = TERMINAL_WINDOW_DROPDOWN (data);
+  GdkGrabStatus   status;
+  GdkWindow  *window;
+
+  window = gtk_widget_get_window (GTK_WIDGET (dropdown));
+  status = gdk_keyboard_grab (window, FALSE, GDK_CURRENT_TIME);
+  if (status == GDK_GRAB_SUCCESS)
+{
+  /* drop the grab */
+  gdk_keyboard_ungrab (GDK_CURRENT_TIME);
+
+  return FALSE;
+}
+
+  return TRUE;
+}
+
+
+
+static void
+terminal_window_dropdown_can_grab_destroyed (gpointer data)
+{
+  TERMINAL_WINDOW_DROPDOWN (data)-grab_timeout_id = 0;
+}
+
+
+
+static gboolean
 terminal_window_dropdown_focus_out_event (GtkWidget *widget,
   GdkEventFocus *event)
 {
   TerminalWindowDropdown *dropdown = TERMINAL_WINDOW_DROPDOWN (widget);
   gbooleanretval;
-  GdkGrabStatus   status;
 
   /* let Gtk do its thingy */
   retval = (*GTK_WIDGET_CLASS 
(terminal_window_dropdown_parent_class)-focus_out_event) (widget, event);
@@ -431,21 +470,25 @@ terminal_window_dropdown_focus_out_event (GtkWidget 
*widget,
   if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON 
(dropdown-keep_open)))
 {
   /* check if the user is not pressing a key */
-  status = gdk_keyboard_grab (event-window, FALSE, GDK_CURRENT_TIME);
-  if (status == GDK_GRAB_SUCCESS)
+  if (!terminal_window_dropdown_can_grab (dropdown))
 {
-  /* drop the grab */
-  gdk_keyboard_ungrab (GDK_CURRENT_TIME);
-
   /* hide the window */
   terminal_window_dropdown_hide (dropdown);
 
   return retval;
 }
+  else if (dropdown-grab_timeout_id == 0)
+{
+  /* focus-out with keyboard grab */
+  dropdown-grab_timeout_id =
+  g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 50, 
terminal_window_dropdown_can_grab,
+  dropdown, 
terminal_window_dropdown_can_grab_destroyed);
+}
 }
 
   /* focus out time */
   dropdown-focus_out_time = g_get_real_time ();
+
 }
 
   return retval;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-terminal:master Hide search dialog on delete.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to fad6c3cf731e0273f3c034a8a540f78109805a0b (commit)
   from 8c0abbdb486744577067fe326f45efdb6d79b399 (commit)

commit fad6c3cf731e0273f3c034a8a540f78109805a0b
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 13:38:45 2012 +0100

Hide search dialog on delete.

 terminal/terminal-window.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 04be378..fc2b211 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -1723,6 +1723,8 @@ terminal_window_action_search (GtkAction  *action,
   window-search_dialog = terminal_search_dialog_new (GTK_WINDOW (window));
   g_signal_connect (G_OBJECT (window-search_dialog), response,
   G_CALLBACK (terminal_window_action_search_response), window);
+  g_signal_connect (G_OBJECT (window-search_dialog), delete-event,
+  G_CALLBACK (gtk_widget_hide_on_delete), NULL);
 }
 
   /* increase child counter */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-terminal:master Rename the dialogs file to util.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to c2bf570ea5311f65c825ca2c221924981b9b9015 (commit)
   from fad6c3cf731e0273f3c034a8a540f78109805a0b (commit)

commit c2bf570ea5311f65c825ca2c221924981b9b9015
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 13:44:56 2012 +0100

Rename the dialogs file to util.

 po/POTFILES.in   |2 +-
 terminal/Makefile.am |4 ++--
 terminal/terminal-preferences-dialog.c   |2 +-
 terminal/terminal-preferences-dropdown-dialog.c  |2 +-
 terminal/terminal-screen.c   |4 ++--
 terminal/{terminal-dialogs.c = terminal-util.c} |   12 ++--
 terminal/{terminal-dialogs.h = terminal-util.h} |8 
 terminal/terminal-widget.c   |2 +-
 terminal/terminal-window-dropdown.c  |   12 ++--
 terminal/terminal-window.c   |   12 ++--
 10 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index 256b794..c9e7fd9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -8,7 +8,6 @@ colorschemes/xterm.theme.in
 
 terminal/main.c
 terminal/terminal-app.c
-terminal/terminal-dialogs.c
 terminal/terminal-encoding-action.c
 terminal/terminal-gdbus.c
 terminal/terminal-image-loader.c
@@ -18,6 +17,7 @@ terminal/terminal-preferences-dropdown-dialog.c
 terminal/terminal-preferences.c
 terminal/terminal-screen.c
 terminal/terminal-search-dialog.c
+terminal/terminal-util.c
 terminal/terminal-widget.c
 terminal/terminal-window-dropdown.c
 terminal/terminal-window.c
diff --git a/terminal/Makefile.am b/terminal/Makefile.am
index 1ce5036..99c55b0 100644
--- a/terminal/Makefile.am
+++ b/terminal/Makefile.am
@@ -18,7 +18,6 @@ xfce4_terminal_built_sources = \
 
 xfce4_terminal_headers = \
terminal-app.h \
-   terminal-dialogs.h \
terminal-encoding-action.h \
terminal-gdbus.h \
terminal-image-loader.h \
@@ -29,6 +28,7 @@ xfce4_terminal_headers = \
terminal-search-dialog.h \
terminal-private.h \
terminal-screen.h \
+   terminal-util.h \
terminal-widget.h \
terminal-window.h \
terminal-window-dropdown.h
@@ -38,7 +38,6 @@ xfce4_terminal_SOURCES = \
$(xfce4_terminal_headers) \
main.c \
terminal-app.c \
-   terminal-dialogs.c \
terminal-encoding-action.c \
terminal-gdbus.c \
terminal-image-loader.c \
@@ -48,6 +47,7 @@ xfce4_terminal_SOURCES = \
terminal-preferences-dropdown-dialog.c \
terminal-search-dialog.c \
terminal-screen.c \
+   terminal-util.c \
terminal-widget.c \
terminal-window.c \
terminal-window-dropdown.c
diff --git a/terminal/terminal-preferences-dialog.c 
b/terminal/terminal-preferences-dialog.c
index 52ebd59..acf7a7a 100644
--- a/terminal/terminal-preferences-dialog.c
+++ b/terminal/terminal-preferences-dialog.c
@@ -24,7 +24,7 @@
 
 #include libxfce4ui/libxfce4ui.h
 
-#include terminal/terminal-dialogs.h
+#include terminal/terminal-util.h
 #include terminal/terminal-enum-types.h
 #include terminal/terminal-preferences-dialog.h
 #include terminal/terminal-encoding-action.h
diff --git a/terminal/terminal-preferences-dropdown-dialog.c 
b/terminal/terminal-preferences-dropdown-dialog.c
index 227e440..8fd59af 100644
--- a/terminal/terminal-preferences-dropdown-dialog.c
+++ b/terminal/terminal-preferences-dropdown-dialog.c
@@ -22,7 +22,7 @@
 
 #include libxfce4ui/libxfce4ui.h
 
-#include terminal/terminal-dialogs.h
+#include terminal/terminal-util.h
 #include terminal/terminal-enum-types.h
 #include terminal/terminal-preferences.h
 #include terminal/terminal-preferences-dropdown-dialog.h
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 429cb5c..c21cda7 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -41,7 +41,7 @@
 
 #include libxfce4ui/libxfce4ui.h
 
-#include terminal/terminal-dialogs.h
+#include terminal/terminal-util.h
 #include terminal/terminal-enum-types.h
 #include terminal/terminal-image-loader.h
 #include terminal/terminal-marshal.h
@@ -2172,7 +2172,7 @@ terminal_screen_get_tab_label (TerminalScreen *screen)
   gtk_widget_show (button);
 
   /* make button a bit smaller */
-  terminal_set_style_thinkess (button, 0);
+  terminal_util_set_style_thinkess (button, 0);
 
   /* button image */
   image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
diff --git a/terminal/terminal-dialogs.c b/terminal/terminal-util.c
similarity index 93%
rename from terminal/terminal-dialogs.c
rename to terminal/terminal-util.c
index 04ecc8b..ab76910 100644
--- a/terminal/terminal-dialogs.c
+++ b/terminal/terminal-util.c
@@ -35,13 +35,13 @@
 #include X11/Xlib.h
 #endif
 
-#include terminal/terminal-dialogs.h
+#include terminal/terminal-util.h
 #include terminal/terminal-private.h
 
 
 
 /**
- * terminal_dialogs_show_about:
+ * 

[Xfce4-commits] thunar:master Fix French translation.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to e6e32e7cbc3291a8e6713d531782102c6ea5bd77 (commit)
   from c17432ac0c7d2f0b47be648da2410c331cc4d42e (commit)

commit e6e32e7cbc3291a8e6713d531782102c6ea5bd77
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 30 14:07:25 2012 +0100

Fix French translation.

 po/fr.po |   32 
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/po/fr.po b/po/fr.po
index 8ef4bea..0f91958 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -8,7 +8,7 @@
 # Mike Massonnet mmasson...@xfce.org, 2008.
 # Patrick Douart patric...@laposte.net, 2009.
 # Jean-Philippe Fleury cont...@jpfleury.net, 2011.
-# 
+#
 msgid 
 msgstr 
 Project-Id-Version: Thunar\n
@@ -704,7 +704,7 @@ msgid ReplaceDialogPart1|Do you want to replace the 
existing file
 msgstr ReplaceDialogPart1|Voulez-vous remplacer le fichier existant
 
 #. Fourth box (size, volume, free space)
-#. 
+#.
 #: ../thunar/thunar-dialogs.c:618 ../thunar/thunar-dialogs.c:649
 #: ../thunar/thunar-properties-dialog.c:456
 msgid Size:
@@ -804,7 +804,7 @@ msgid Owner
 msgstr Propriétaire
 
 #. Permissions chooser
-#. 
+#.
 #: ../thunar/thunar-enum-types.c:98 ../thunar/thunar-properties-dialog.c:528
 msgid Permissions
 msgstr Permissions
@@ -1280,7 +1280,7 @@ msgstr « %s » %s
 #. * where the trashed file/folder was located before it was moved to the
 #. trash), otherwise the
 #. * properties dialog width will be messed up.
-#. 
+#.
 #: ../thunar/thunar-list-model.c:2265 ../thunar/thunar-properties-dialog.c:364
 msgid Original Path:
 msgstr Chemin d'origine :
@@ -1603,7 +1603,7 @@ msgid File Manager Preferences
 msgstr Préférences du gestionnaire de fichiers
 
 #. Display
-#. 
+#.
 #: ../thunar/thunar-preferences-dialog.c:242
 msgid Display
 msgstr Affichage
@@ -1681,7 +1681,7 @@ msgid _Format:
 msgstr _Format :
 
 #. Side Pane
-#. 
+#.
 #: ../thunar/thunar-preferences-dialog.c:363
 msgid Side Pane
 msgstr Panneau latéral
@@ -1764,7 +1764,7 @@ msgstr 
 propriétés.
 
 #. Behavior
-#. 
+#.
 #: ../thunar/thunar-preferences-dialog.c:457
 msgid Behavior
 msgstr Comportement
@@ -1830,7 +1830,7 @@ msgid Open folder in new _tab
 msgstr Ouvrir le dossier dans un nouvel onglet
 
 #. Advanced
-#. 
+#.
 #: ../thunar/thunar-preferences-dialog.c:581
 msgid Advanced
 msgstr Avancée
@@ -1916,7 +1916,7 @@ msgid Names:
 msgstr Nom :
 
 #. Second box (kind, open with, link target)
-#. 
+#.
 #: ../thunar/thunar-properties-dialog.c:311
 msgid Kind:
 msgstr Type :
@@ -1934,7 +1934,7 @@ msgid Location:
 msgstr Chemin :
 
 #. Third box (deleted, modified, accessed)
-#. 
+#.
 #: ../thunar/thunar-properties-dialog.c:403
 msgid Deleted:
 msgstr Supprimé :
@@ -1952,7 +1952,7 @@ msgid Free Space:
 msgstr Espace libre :
 
 #. Emblem chooser
-#. 
+#.
 #: ../thunar/thunar-properties-dialog.c:518
 msgid Emblems
 msgstr Emblèmes
@@ -2066,7 +2066,7 @@ msgstr 
 #. from $libdir/thunarx-2/,
 #. *  and opening the multi rename dialog by selecting multiple
 #. files and pressing F2.
-#. 
+#.
 #: ../thunar/thunar-renamer-dialog.c:611
 msgid 
 No renamer modules were found on your system. Please check your\n
@@ -2180,7 +2180,7 @@ msgstr[1] La corbeille contient %d fichiers
 
 #: ../thunar/thunar-shortcuts-model.c:885
 msgid DEVICES
-msgstr DISPOSITIFS
+msgstr PERIPHERIQUES
 
 #: ../thunar/thunar-shortcuts-model.c:927
 msgid NETWORK
@@ -2192,7 +2192,7 @@ msgstr Parcourir le réseau
 
 #: ../thunar/thunar-shortcuts-model.c:954
 msgid PLACES
-msgstr LIEUX
+msgstr EMPLACEMENTS
 
 #: ../thunar/thunar-shortcuts-pane.c:393
 msgid Side Pane (Create Shortcut)
@@ -2871,7 +2871,7 @@ msgid Change the visibility of this window's menubar
 msgstr Changer la visibilité de la barre de statut de cette fenêtre
 
 #. * add view options
-#. 
+#.
 #: ../thunar/thunar-window.c:757
 msgid View as _Icons
 msgstr Vue en _icônes
@@ -3551,7 +3551,7 @@ msgid If you delete a custom action, it is permanently 
lost.
 msgstr Ceci supprimera définitivement cette action.
 
 #. Basic
-#. 
+#.
 #: ../plugins/thunar-uca/thunar-uca-editor.c:122
 msgid Basic
 msgstr Base
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-terminal:master Set minimum tab label size to 10 chars.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to 907ff4781dd3676d85f1d6a762eb310ff333d8f0 (commit)
   from dad13202000cea688cffbb531d5c1475fa406094 (commit)

commit 907ff4781dd3676d85f1d6a762eb310ff333d8f0
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 14:02:50 2012 +0100

Set minimum tab label size to 10 chars.

 terminal/terminal-screen.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index c21cda7..c164b62 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -2145,6 +2145,7 @@ terminal_screen_get_tab_label (TerminalScreen *screen)
 
   screen-tab_label = gtk_label_new (NULL);
   gtk_misc_set_padding (GTK_MISC (screen-tab_label), 2, 0);
+  gtk_label_set_width_chars (GTK_LABEL (screen-tab_label), 10);
   gtk_box_pack_start  (GTK_BOX (hbox), screen-tab_label, TRUE, TRUE, 0);
   g_object_bind_property (G_OBJECT (screen), title,
   G_OBJECT (screen-tab_label), label,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-terminal:master Make tab menu more functional.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to a9e840141ed18c4a2062e028a63c7acc767e1052 (commit)
   from 907ff4781dd3676d85f1d6a762eb310ff333d8f0 (commit)

commit a9e840141ed18c4a2062e028a63c7acc767e1052
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 14:09:09 2012 +0100

Make tab menu more functional.

 terminal/terminal-window-ui.xml |7 +++
 terminal/terminal-window.c  |8 
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/terminal/terminal-window-ui.xml b/terminal/terminal-window-ui.xml
index df562ed..16dda85 100644
--- a/terminal/terminal-window-ui.xml
+++ b/terminal/terminal-window-ui.xml
@@ -79,6 +79,13 @@
 menuitem action=detach-tab/
 menuitem action=set-title/
 separator/
+menuitem action=move-tab-left/
+menuitem action=move-tab-right/
+separator/
+menu action=tabs-menu
+  placeholder name=placeholder-tab-items/
+/menu
+separator/
 menuitem action=close-tab/
   /popup
 
diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 15e23cf..8d499cd 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -771,6 +771,14 @@ terminal_window_rebuild_tabs_menu (TerminalWindow *window)
  /main-menu/tabs-menu/placeholder-tab-items,
  name, name, GTK_UI_MANAGER_MENUITEM, FALSE);
 
+  if (npages  1)
+{
+  /* add to right-click tab menu */
+  gtk_ui_manager_add_ui (window-ui_manager, 
window-tabs_menu_merge_id,
+ /tab-menu/tabs-menu/placeholder-tab-items,
+ name, name, GTK_UI_MANAGER_MENUITEM, FALSE);
+}
+
   /* set an accelerator path */
   g_snprintf (name, sizeof (name), 
Actions/terminal-window/goto-tab-%d, n + 1);
   gtk_action_set_accel_path (GTK_ACTION (radio_action), name);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:jeromeg/keyboard-shortcuts Add functions to handle xfwm4 feature names.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/keyboard-shortcuts
 to 80dc447a8b9236a3c006b0e38009d35891c18891 (commit)
   from b9f459f6c28796d5140b2a75b4ce05f108214716 (commit)

commit 80dc447a8b9236a3c006b0e38009d35891c18891
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 30 14:34:44 2012 +0100

Add functions to handle xfwm4 feature names.

This is used to provide translated versions of the strings to other
applications. Sharing the translations in the header was not working due
to textdomain issues.

 libxfce4kbd-private/Makefile.am |5 +-
 libxfce4kbd-private/xfce-shortcuts-xfwm4.c  |  146 +++
 libxfce4kbd-private/xfce-shortcuts-xfwm4.h  |   23 
 libxfce4kbd-private/xfce-shortcuts.c|   29 ++
 libxfce4kbd-private/xfwm4-shortcut-values.h |  106 ---
 5 files changed, 180 insertions(+), 129 deletions(-)

diff --git a/libxfce4kbd-private/Makefile.am b/libxfce4kbd-private/Makefile.am
index b9b438f..e5cca7c 100644
--- a/libxfce4kbd-private/Makefile.am
+++ b/libxfce4kbd-private/Makefile.am
@@ -16,7 +16,7 @@ libxfce4kbd_headers = \
xfce-shortcuts-grabber.h \
xfce-shortcut-dialog.h \
xfce-shortcuts.h \
-   xfwm4-shortcut-values.h
+   xfce-shortcuts-xfwm4.h
 
 libxfce4kbd_built_sources = \
xfce-shortcuts-marshal.c \
@@ -28,7 +28,8 @@ libxfce4kbd_sources = \
xfce-shortcuts-provider.c \
xfce-shortcuts-grabber.c \
xfce-shortcut-dialog.c \
-   xfce-shortcuts.c
+   xfce-shortcuts.c \
+   xfce-shortcuts-xfwm4.c
 
 lib_LTLIBRARIES = libxfce4kbd-private-2.la
 
diff --git a/libxfce4kbd-private/xfce-shortcuts-xfwm4.c 
b/libxfce4kbd-private/xfce-shortcuts-xfwm4.c
new file mode 100644
index 000..2626d2b
--- /dev/null
+++ b/libxfce4kbd-private/xfce-shortcuts-xfwm4.c
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2012 Jérôme Guelfucci jero...@xfce.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * 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
+ * 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., Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include config.h
+#endif
+
+#include libxfce4util/libxfce4util.h
+#include libxfce4kbd-private/xfce-shortcuts-xfwm4.h
+
+typedef struct _ShortcutTemplate ShortcutTemplate;
+
+struct _ShortcutTemplate
+{
+  const gchar *name;
+  const gchar *feature;
+};
+
+const ShortcutTemplate xfwm4_shortcut_values[] = {
+  { N_(Window operations menu), popup_menu_key },
+  { N_(Up), up_key },
+  { N_(Down), down_key },
+  { N_(Left), left_key },
+  { N_(Right), right_key },
+  { N_(Cancel), cancel_key },
+  { N_(Cycle windows), cycle_windows_key },
+  { N_(Cycle windows (Reverse)), cycle_reverse_windows_key },
+  { N_(Switch window for same application), switch_window_key },
+  { N_(Switch application), switch_application_key },
+  { N_(Close window), close_window_key },
+  { N_(Maximize window horizontally), maximize_horiz_key },
+  { N_(Maximize window vertically), maximize_vert_key },
+  { N_(Maximize window), maximize_window_key },
+  { N_(Hide window), hide_window_key },
+  { N_(Move window), move_window_key },
+  { N_(Resize window), resize_window_key },
+  { N_(Shade window), shade_window_key },
+  { N_(Stick window), stick_window_key },
+  { N_(Raise window), raise_window_key },
+  { N_(Lower window), lower_window_key },
+  { N_(Raise or lower window), raiselower_window_key },
+  { N_(Fill window), fill_window_key },
+  { N_(Fill window horizontally), fill_horiz_key },
+  { N_(Fill window vertically), fill_vert_key },
+  { N_(Toggle above), above_key },
+  { N_(Toggle fullscreen), fullscreen_key },
+  { N_(Move window to upper workspace), move_window_up_workspace_key },
+  { N_(Move window to bottom workspace), move_window_down_workspace_key },
+  { N_(Move window to left workspace), move_window_left_workspace_key },
+  { N_(Move window to right workspace), move_window_right_workspace_key },
+  { N_(Move window to previous workspace), move_window_prev_workspace_key 
},
+  { N_(Move window to next workspace), move_window_next_workspace_key },
+  { N_(Move window to workspace 1), move_window_workspace_1_key },
+  { N_(Move window to workspace 2), move_window_workspace_2_key },
+  { N_(Move window to workspace 3), move_window_workspace_3_key },
+  { N_(Move window to workspace 4), move_window_workspace_4_key },
+  { N_(Move window to workspace 5), 

[Xfce4-commits] xfwm4:jeromeg/keyboard-shortcuts Use new libxfce4kb-private functions for feature names.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/keyboard-shortcuts
 to 1498e23fdbecad0d35c9cf53d7b29f55ec098213 (commit)
   from d2f828e9ee673bd5857852b77666e8949b7d9ac0 (commit)

commit 1498e23fdbecad0d35c9cf53d7b29f55ec098213
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 30 14:36:35 2012 +0100

Use new libxfce4kb-private functions for feature names.

The strings are now translated.

 settings-dialogs/xfwm4-settings.c |   24 
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/settings-dialogs/xfwm4-settings.c 
b/settings-dialogs/xfwm4-settings.c
index e621141..15a83e7 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -43,7 +43,7 @@
 #include xfconf/xfconf.h
 #include libxfce4kbd-private/xfce-shortcut-dialog.h
 #include libxfce4kbd-private/xfce-shortcuts-provider.h
-#include libxfce4kbd-private/xfwm4-shortcut-values.h
+#include libxfce4kbd-private/xfce-shortcuts-xfwm4.h
 
 #include xfwm4-dialog_ui.h
 #include xfwm4-settings.h
@@ -1621,7 +1621,7 @@ xfwm_settings_initialize_shortcuts (XfwmSettings 
*settings)
   GtkTreeModel *model;
   GtkTreeIter   iter;
   GtkWidget*view;
-  gint  i;
+  GList*feature_list;
 
   g_return_if_fail (XFWM_IS_SETTINGS (settings));
   g_return_if_fail (GTK_IS_BUILDER (settings-priv-builder));
@@ -1631,13 +1631,21 @@ xfwm_settings_initialize_shortcuts (XfwmSettings 
*settings)
 
   gtk_list_store_clear (GTK_LIST_STORE (model));
 
-  for (i = 0; xfwm4_shortcut_values[i].name != NULL; ++i)
+  if (feature_list = xfce_shortcuts_xfwm4_get_feature_list ())
 {
-  gtk_list_store_append (GTK_LIST_STORE (model), iter);
-  gtk_list_store_set (GTK_LIST_STORE (model), iter,
-  SHORTCUTS_NAME_COLUMN, 
_(xfwm4_shortcut_values[i].name),
-  SHORTCUTS_FEATURE_COLUMN, 
xfwm4_shortcut_values[i].feature,
-  -1);
+  GList *l;
+
+  for (l = g_list_first (feature_list); l != NULL; l = g_list_next (l))
+{
+  gtk_list_store_append (GTK_LIST_STORE (model), iter);
+  gtk_list_store_set (GTK_LIST_STORE (model), iter,
+  SHORTCUTS_NAME_COLUMN,
+  xfce_shortcuts_xfwm4_get_feature_name (l-data),
+  SHORTCUTS_FEATURE_COLUMN, l-data,
+  -1);
+}
+
+  g_list_free (feature_list);
 }
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfwm4:jeromeg/keyboard-shortcuts Update treeview when choosing to use new value in a conflict.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/keyboard-shortcuts
 to 5b473cf697eab460c157619d5c1c0c12cd2313b0 (commit)
   from 1498e23fdbecad0d35c9cf53d7b29f55ec098213 (commit)

commit 5b473cf697eab460c157619d5c1c0c12cd2313b0
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 30 15:01:58 2012 +0100

Update treeview when choosing to use new value in a conflict.

We need to erase the old shortcut manually in the treeview as we won't
get a signal for features which are not used anymore.

 settings-dialogs/xfwm4-settings.c |   45 -
 1 files changed, 44 insertions(+), 1 deletions(-)

diff --git a/settings-dialogs/xfwm4-settings.c 
b/settings-dialogs/xfwm4-settings.c
index 15a83e7..4f284d3 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -175,6 +175,10 @@ static void   xfwm_settings_shortcut_added 
  (XfceShortc
 static void   xfwm_settings_shortcut_removed 
(XfceShortcutsProvider *provider,
   const 
gchar   *shortcut,
   
XfwmSettings  *settings);
+static gboolean   xfwm_settings_update_treeview_on_conflict_replace  
(GtkTreeModel  *model,
+  
GtkTreePath   *path,
+  
GtkTreeIter   *iter,
+  gpointer 
  shortcut_to_erase);
 static void   xfwm_settings_shortcut_edit_clicked
(GtkButton *button,
   
XfwmSettings  *settings);
 static void   xfwm_settings_shortcut_clear_clicked   
(GtkButton *button,
@@ -1909,6 +1913,35 @@ xfwm_settings_shortcut_reset_clicked (GtkButton
*button,
 
 
 static gboolean
+xfwm_settings_update_treeview_on_conflict_replace (GtkTreeModel *model,
+   GtkTreePath  *path,
+   GtkTreeIter  *iter,
+   gpointer  
shortcut_to_erase)
+{
+  gchar *shortcut;
+
+  gtk_tree_model_get (model, iter, SHORTCUTS_SHORTCUT_COLUMN, shortcut, -1);
+
+  if (g_strcmp0 (shortcut_to_erase, shortcut) == 0)
+{
+  /* We found the iter for which we want to erase the shortcut value */
+  /* Let's do it! */
+  gtk_list_store_set (GTK_LIST_STORE (model), iter,
+  SHORTCUTS_SHORTCUT_COLUMN, NULL,
+  SHORTCUTS_SHORTCUT_LABEL_COLUMN, NULL, -1);
+
+  g_free (shortcut);
+
+  return TRUE;
+}
+
+  g_free (shortcut);
+
+  return FALSE;
+}
+
+
+static gboolean
 xfwm_settings_validate_shortcut (XfceShortcutDialog  *dialog,
  const gchar *shortcut,
  XfwmSettings*settings)
@@ -1964,7 +1997,17 @@ xfwm_settings_validate_shortcut (XfceShortcutDialog  
*dialog,
 FALSE);
 
   if (G_UNLIKELY (response == GTK_RESPONSE_ACCEPT))
-xfce_shortcuts_provider_reset_shortcut (other_provider, shortcut);
+{
+  GObject *view;
+
+  xfce_shortcuts_provider_reset_shortcut (other_provider, 
shortcut);
+
+  /* We need to update the treeview to erase the shortcut value */
+  view = gtk_builder_get_object (settings-priv-builder, 
shortcuts_treeview);
+  gtk_tree_model_foreach (gtk_tree_view_get_model (GTK_TREE_VIEW 
(view)),
+  
xfwm_settings_update_treeview_on_conflict_replace,
+  (gpointer) shortcut);
+}
   else
 accepted = FALSE;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-terminal:master Add option to always show tabs in the drop-down window.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to 0a627860ef9a17c32b0e331665288db25f631390 (commit)
   from a9e840141ed18c4a2062e028a63c7acc767e1052 (commit)

commit 0a627860ef9a17c32b0e331665288db25f631390
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 15:21:48 2012 +0100

Add option to always show tabs in the drop-down window.

 terminal/terminal-preferences-dropdown-dialog.c |3 +-
 terminal/terminal-preferences-dropdown.glade|   27 --
 terminal/terminal-preferences.c |   11 
 terminal/terminal-window-dropdown.c |   48 +++--
 terminal/terminal-window.c  |   67 ---
 terminal/terminal-window.h  |2 +
 6 files changed, 102 insertions(+), 56 deletions(-)

diff --git a/terminal/terminal-preferences-dropdown-dialog.c 
b/terminal/terminal-preferences-dropdown-dialog.c
index 8fd59af..388452a 100644
--- a/terminal/terminal-preferences-dropdown-dialog.c
+++ b/terminal/terminal-preferences-dropdown-dialog.c
@@ -91,7 +91,8 @@ terminal_preferences_dropdown_dialog_init 
(TerminalPreferencesDropdownDialog *di
dropdown-keep-above,
dropdown-toggle-focus,
dropdown-status-icon,
-   dropdown-move-to-active };
+   dropdown-move-to-active,
+   dropdown-always-show-tabs };
   const gchar  *props_value[] = { dropdown-height,
   dropdown-width,
   dropdown-position,
diff --git a/terminal/terminal-preferences-dropdown.glade 
b/terminal/terminal-preferences-dropdown.glade
index fbad2a8..a1adb1a 100644
--- a/terminal/terminal-preferences-dropdown.glade
+++ b/terminal/terminal-preferences-dropdown.glade
@@ -193,7 +193,7 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=border_width6/property
-property name=n_rows4/property
+property name=n_rows5/property
 property name=n_columns3/property
 property name=column_spacing2/property
 property name=row_spacing6/property
@@ -202,13 +202,13 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=xalign0/property
-property name=xpad6/property
 property name=label 
translatable=yes_Width:/property
 property name=use_underlineTrue/property
 property 
name=mnemonic_widgetscale-width/property
   /object
   packing
 property name=x_optionsGTK_FILL/property
+property name=x_padding6/property
   /packing
 /child
 child
@@ -216,7 +216,6 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=xalign0/property
-property name=xpad6/property
 property name=label 
translatable=yesHe_ight:/property
 property name=use_underlineTrue/property
 property 
name=mnemonic_widgetscale-height/property
@@ -225,6 +224,7 @@
 property name=top_attach1/property
 property name=bottom_attach2/property
 property name=x_optionsGTK_FILL/property
+property name=x_padding6/property
   /packing
 /child
 child
@@ -232,7 +232,6 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=xalign0/property
-property name=xpad6/property
 property name=label 
translatable=yes_Opacity:/property
 property name=use_underlineTrue/property
 property 
name=mnemonic_widgetscale-opacity/property
@@ -241,6 +240,7 @@
 property name=top_attach2/property
 property name=bottom_attach3/property
 property name=x_optionsGTK_FILL/property
+property name=x_padding6/property
   /packing
 /child
  

[Xfce4-commits] xfwm4:jeromeg/keyboard-shortcuts Improve main shortcuts view as per Nick's suggestions.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/jeromeg/keyboard-shortcuts
 to 6b8259ee4c95c9d9fb7c642821df5926c3de514e (commit)
   from 5b473cf697eab460c157619d5c1c0c12cd2313b0 (commit)

commit 6b8259ee4c95c9d9fb7c642821df5926c3de514e
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 30 15:21:24 2012 +0100

 Improve main shortcuts view as per Nick's suggestions.

 Don't use a GtkFrame and put everything in a GtkAlignment instead. This
 is consistent with xfce4-keyboard-settings.

 settings-dialogs/xfwm4-dialog.glade |  163 +++
 1 files changed, 88 insertions(+), 75 deletions(-)

diff --git a/settings-dialogs/xfwm4-dialog.glade 
b/settings-dialogs/xfwm4-dialog.glade
index d623b7b..09c457c 100644
--- a/settings-dialogs/xfwm4-dialog.glade
+++ b/settings-dialogs/xfwm4-dialog.glade
@@ -506,20 +506,34 @@
   /packing
 /child
 child
-  object class=GtkFrame id=frame9
+  object class=GtkAlignment id=alignment12
 property name=visibleTrue/property
 property name=can_focusFalse/property
-property name=border_width12/property
-property name=label_xalign0/property
-property name=shadow_typenone/property
+property name=top_padding6/property
+property name=bottom_padding6/property
+property name=left_padding12/property
 child
-  object class=GtkAlignment id=alignment12
+  object class=GtkVBox id=vbox10
 property name=visibleTrue/property
 property name=can_focusFalse/property
-property name=border_width6/property
-property name=left_padding12/property
+property name=spacing6/property
+child
+  object class=GtkLabel id=label22
+property name=visibleTrue/property
+property name=can_focusFalse/property
+property name=xalign0/property
+property name=label translatable=yesDefine 
shortcuts to perform _window manager actions:/property
+property name=use_markupTrue/property
+property name=use_underlineTrue/property
+  /object
+  packing
+property name=expandFalse/property
+property name=fillFalse/property
+property name=position0/property
+  /packing
+/child
 child
-  object class=GtkVBox id=vbox10
+  object class=GtkVBox id=vbox11
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=spacing6/property
@@ -544,85 +558,84 @@
   /packing
 /child
 child
-  object class=GtkAlignment id=alignment15
+  placeholder/
+/child
+  /object
+  packing
+property name=expandTrue/property
+property name=fillTrue/property
+property name=position1/property
+  /packing
+/child
+child
+  object class=GtkAlignment id=alignment15
+property name=visibleTrue/property
+property name=can_focusFalse/property
+property name=yalign0/property
+property name=xscale0/property
+child
+  object class=GtkHBox id=hbox5
 property name=visibleTrue/property
 property name=can_focusFalse/property
-property name=yalign0/property
-property name=xscale0/property
+property name=spacing6/property
 child
-  object class=GtkHBox id=hbox5
+  object class=GtkButton 
id=shortcuts_edit_button
+property name=labelgtk-edit/property
+property 
name=use_action_appearanceFalse/property
 property name=visibleTrue/property
-property name=can_focusFalse/property
-property name=spacing6/property
-child
-  object class=GtkButton 
id=shortcuts_edit_button
-property 

[Xfce4-commits] mousepad:master Set textdomain codeset to utf-8.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to 65972f7925b8f810a7356eddad80e559ad64e03c (commit)
   from bd725ea7e5fdce6887c00bc4d78be3e3938340e9 (commit)

commit 65972f7925b8f810a7356eddad80e559ad64e03c
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 15:23:52 2012 +0100

Set textdomain codeset to utf-8.

 mousepad/main.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/mousepad/main.c b/mousepad/main.c
index 97de767..4ad6c1d 100644
--- a/mousepad/main.c
+++ b/mousepad/main.c
@@ -72,6 +72,7 @@ main (gint argc, gchar **argv)
 
   /* bind the text domain to the locale directory */
   bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
+  bind_textdomain_codeset (GETTEXT_PACKAGE, UTF-8);
 
   /* set the package textdomain */
   textdomain (GETTEXT_PACKAGE);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master l10n: Fixed Romanian translation.

2012-12-30 Thread Transifex
Updating branch refs/heads/master
 to 1459dfb44573caf3d587ded15ceaf70fc6a76db3 (commit)
   from 9a4bd942ee575e032b448ba417226fbaa6fb5a9c (commit)

commit 1459dfb44573caf3d587ded15ceaf70fc6a76db3
Author: Mișu Moldovan du...@xfce.org
Date:   Sun Dec 30 15:29:20 2012 +0100

l10n: Fixed Romanian translation.

New status: 633 messages complete with 0 fuzzies and 0 untranslated.

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

 po/ro.po |   46 +-
 1 files changed, 25 insertions(+), 21 deletions(-)

diff --git a/po/ro.po b/po/ro.po
index 0a6f720..d43f698 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -1,24 +1,25 @@
 # Romanian translation for Midori
 # Traducerea în limba română pentru Midori.
-# Copyright (C) 2009-2011 THE midori'S COPYRIGHT HOLDER
+# Copyright (C) 2009-2012 THE midori'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the midori package.
 # Igor Știrbu igor.sti...@gmail.com 2009
-# Mișu Moldovan du...@xfce.org 2009-2011
+# Mișu Moldovan du...@xfce.org 2009-2012
 # Andrei Popescu andreimpope...@gmail.com 2010
-# 
+#
 msgid 
 msgstr 
-Project-Id-Version: midori 0.3.6\n
+Project-Id-Version: midori 0.4.7git\n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2012-12-30 08:42+\n
-PO-Revision-Date: 2011-07-30 16:21+0300\n
+POT-Creation-Date: 2012-12-30 14:03+\n
+PO-Revision-Date: 2012-12-30 16:26+0200\n
 Last-Translator: Mișu Moldovan du...@xfce.org\n
 Language-Team: Romanian debian-l10n-roman...@lists.debian.org\n
+Language: ro\n
 MIME-Version: 1.0\n
 Content-Type: text/plain; charset=UTF-8\n
 Content-Transfer-Encoding: 8bit\n
-Language: ro\n
-Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100  0  n%100  
20)) ? 1 : 2);;\n
+Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100  0  n%100  
+20)) ? 1 : 2);;\n
 X-Generator: Virtaal 0.6.1\n
 
 #: ../data/midori.desktop.in.h:1
@@ -93,7 +94,9 @@ msgstr Navigare privată, nu se salvează modificările
 
 #: ../midori/main.c:94
 msgid Portable mode, all runtime files are stored in one place
-msgstr Mod portabil, toate fișierele necesare executabilului sunt ținute 
într-un singur loc
+msgstr 
+Mod portabil, toate fișierele necesare executabilului sunt ținute într-un 
+singur loc
 
 #: ../midori/main.c:97
 msgid Plain GTK+ window with WebKit, akin to GtkLauncher
@@ -167,7 +170,7 @@ msgstr Favori_te
 
 #: ../midori/midori-app.c:1352
 msgid Add Boo_kmark
-msgstr _Adaugă ca favorit
+msgstr Adaugă ca fa_vorit
 
 #: ../midori/midori-app.c:1353
 msgid _Extensions
@@ -347,10 +350,9 @@ msgid 
 Aggregator. Next time you click the news feed icon, it will be added 
 automatically.
 msgstr 
-Pentru a deschide ca un agregator de știri adresa URI de mai sus. De obicei, 
-există un meniu ori un buton „Subscriere nouă”, „Nou flux de știri” ori ceva 
-asemănător.\n
-Alternativ, puteți selecta un agregator de știri în secțiunea „Programe” a 
+Pentru a utiliza adresa URI de mai sus, deschideți un agregator de știri 
+și adăugați-o ca o „Subscriere nouă”, ori un „Nou flux de știri”.\n
+Alternativ, puteți selecta un agregator de știri în secțiunea „Navigare” a 
 preferințelor Midori. Data viitoare când veți mai da clic pe iconița unui 
 flux de știri, acesta va fi adăugat automat.
 
@@ -530,7 +532,7 @@ msgstr Salvează într-un fișier
 
 #: ../midori/midori-browser.c:5147
 msgid Add to Speed _dial
-msgstr Adaugă ca ap_el rapid
+msgstr Ada_ugă ca apel rapid
 
 #. N_(Add Shortcut to the _desktop), ,
 #: ../midori/midori-browser.c:5151
@@ -676,7 +678,7 @@ msgstr Golește gunoiul
 
 #: ../midori/midori-browser.c:5287
 msgid Undo _Close Tab
-msgstr Re_vocă închiderea tabului
+msgstr Revocă înc_hiderea tabului
 
 #: ../midori/midori-browser.c:5294
 msgid Add a new _folder
@@ -692,7 +694,7 @@ msgstr _Gestionați motoarele de căutare
 
 #: ../midori/midori-browser.c:5306
 msgid _Clear Private Data
-msgstr Șt_erge datele private
+msgstr Șterge d_atele private
 
 #: ../midori/midori-browser.c:5309
 msgid _Inspect Page
@@ -756,7 +758,7 @@ msgstr Î_ntrebări frecvente
 
 #: ../midori/midori-browser.c:5350
 msgid _Report a Problem…
-msgstr R_aportați o problemă…
+msgstr Raportați _o problemă…
 
 #: ../midori/midori-browser.c:5355 ../midori/midori-browser.c:6012
 msgid _Tools
@@ -1110,7 +1112,7 @@ msgstr Valoare nevalidă „%s” în preferințe
 #: ../midori/midori-tab.vala:117
 #, c-format
 msgid Failed to inject stylesheet: %s
-msgstr Nu s-a putut injecta foaia de stiluri: %s\n
+msgstr Nu s-a putut injecta foaia de stiluri: %s
 
 #: ../midori/midori-view.c:725 ../midori/midori-view.c:866
 msgid Trust this website
@@ -2302,7 +2304,9 @@ msgstr Întârzie încărcarea paginii până ce accesați 
respectivul tab
 msgid 
 An error occurred when attempting to download a file with the following 
 plugin:\n
-msgstr A intervenit o eroare la încercarea de a descărca un fișier cu 
următorul modul:\n
+msgstr 
+A intervenit o eroare la încercarea de a descărca un fișier cu următorul 
+modul:\n
 
 #: 

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

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to bb03d1007f7f14796bbae1d2b6c00cfb38ac57b2 (commit)
   from 7a7b32e67f6850c80a793df2daf249bce9ef35a1 (commit)

commit bb03d1007f7f14796bbae1d2b6c00cfb38ac57b2
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 4c7905a..0519982 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -367,7 +367,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:master Fix indentation.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 160d4fe42952284a4bcc48760ae6706ca28fa7e5 (commit)
   from bb03d1007f7f14796bbae1d2b6c00cfb38ac57b2 (commit)

commit 160d4fe42952284a4bcc48760ae6706ca28fa7e5
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Tue Dec 18 08:05:21 2012 +0100

Fix indentation.

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

diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c 
b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index b8a56e3..a94351d 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -368,7 +368,7 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
   for (j = 0; j  screens; j++)
 {
   /* Do the grab on all screens */
-  Window root_window;
+  Window root_window;
 
   /* Ignorable modifiers */
   guint mod_masks [] = {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Improve key comparison.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 3bb8c7d4de8132741da54a26c98459167c51fd87 (commit)
   from 160d4fe42952284a4bcc48760ae6706ca28fa7e5 (commit)

commit 3bb8c7d4de8132741da54a26c98459167c51fd87
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 a94351d..b8d2898 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -432,6 +432,7 @@ struct EventKeyFindContext
 {
   XfceShortcutsGrabber *grabber;
   GdkModifierType   modifiers;
+  GdkModifierType   consumed;
   guint keyval;
   const gchar  *result;
 };
@@ -443,30 +444,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;
 
@@ -514,13 +498,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:master No need to remove consumed modifiers twice.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 927438b9ce57253d705a846725892935d02f9f1f (commit)
   from 0da716be5ecc87bcc74c5ea40b14b8f93c0d7d73 (commit)

commit 927438b9ce57253d705a846725892935d02f9f1f
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 dd13f7e..7f194f2 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -432,7 +432,6 @@ struct EventKeyFindContext
 {
   XfceShortcutsGrabber *grabber;
   GdkModifierType   modifiers;
-  GdkModifierType   consumed;
   guint keyval;
   const gchar  *result;
 };
@@ -448,7 +447,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))
 {
@@ -512,7 +511,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:master Fix alt + print being detected as SysReq (bug #7897).

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 0d2c165aeff3da0268276cbc75f9470bfc349e4b (commit)
   from 927438b9ce57253d705a846725892935d02f9f1f (commit)

commit 0d2c165aeff3da0268276cbc75f9470bfc349e4b
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 2ee1931..38e53ea 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -370,6 +370,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 7f194f2..31585b5 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -497,6 +497,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:master Fix keyboard shortcuts with Shift modifier (bug #8744).

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 0da716be5ecc87bcc74c5ea40b14b8f93c0d7d73 (commit)
   from 3bb8c7d4de8132741da54a26c98459167c51fd87 (commit)

commit 0da716be5ecc87bcc74c5ea40b14b8f93c0d7d73
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 0519982..2ee1931 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -371,6 +371,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 b8d2898..dd13f7e 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);
 
@@ -498,6 +498,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;
 
@@ -506,6 +515,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:master Use Primary instead of Control (bug #8200).

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 128a25d53a689896f29a0936d0d686478c107aa7 (commit)
   from 0d2c165aeff3da0268276cbc75f9470bfc349e4b (commit)

commit 128a25d53a689896f29a0936d0d686478c107aa7
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 

[Xfce4-commits] libxfce4ui:master Show the window manager action name when conflicting.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 53be9bc959c524a140c89e0649be7bb86f191550 (commit)
   from c08f561880fcf5633b48549aef8b11710b6ded37 (commit)

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

Show the window manager action name when conflicting.

We use the translated string representing the window manager action so
that the conflict is easy to understand.

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

diff --git a/libxfce4kbd-private/xfce-shortcuts.c 
b/libxfce4kbd-private/xfce-shortcuts.c
index fa417c9..e569a0e 100644
--- a/libxfce4kbd-private/xfce-shortcuts.c
+++ b/libxfce4kbd-private/xfce-shortcuts.c
@@ -33,6 +33,7 @@
 #include xfconf/xfconf.h
 
 #include libxfce4kbd-private/xfce-shortcuts.h
+#include libxfce4kbd-private/xfwm4-shortcut-values.h
 
 
 
@@ -49,8 +50,8 @@ typedef struct
 
 static XfceShortcutConflictMessage conflict_messages[] = {
   { xfwm4, xfwm4,
-N_(This shortcut is already being used for another window manager action. 
Which action do you want to use?),
-N_(Use '%s'), N_(Keep the other one) },
+N_(This shortcut is already being used for the action '%s'. Which action 
do you want to use?),
+N_(Use '%s'), N_(Keep '%s') },
   { xfwm4, commands,
 N_(This shortcut is already being used for the command '%s'. Which action 
do you want to use?),
 N_(Use '%s'), N_(Keep '%s') },
@@ -58,8 +59,8 @@ static XfceShortcutConflictMessage conflict_messages[] = {
 N_(This shortcut is already being used for the command '%s'. Which action 
do you want to use?),
 N_(Use '%s'), N_(Keep '%s') },
   { commands, xfwm4,
-N_(This shortcut is already being used by a window manager action. Which 
action do you want to use?),
-N_(Use '%s'), N_(Keep the window manager action) },
+N_(This shortcut is already being used by the action '%s'. Which action 
do you want to use?),
+N_(Use '%s'), N_(Keep '%s') },
   { 0, 0, NULL, NULL, NULL },
 };
 
@@ -106,8 +107,43 @@ xfce_shortcut_conflict_dialog (const gchar *owner,
 if (g_utf8_collate (conflict_messages[i].owner_name, owner) == 0 
 g_utf8_collate (conflict_messages[i].other_name, other) == 0)
   {
-owner_action_name = owner_action == NULL ? NULL : g_markup_escape_text 
(owner_action, -1);
-other_action_name = other_action == NULL ? NULL : g_markup_escape_text 
(other_action, -1);
+if (owner_action == NULL)
+  owner_action_name = NULL;
+else if (g_utf8_collate (owner, xfwm4) == 0)
+  {
+gint j;
+
+/* We need to get the human readable string of the action name */
+for (j = 0; xfwm4_shortcut_values[j].name != NULL; ++j)
+if (G_UNLIKELY (g_str_equal (xfwm4_shortcut_values[j].feature,
+ owner_action)))
+  {
+owner_action_name =
+  g_markup_escape_text (xfwm4_shortcut_values[j].name, -1);
+break;
+  }
+  }
+else
+  owner_action_name = g_markup_escape_text (owner_action, -1);
+
+if (other_action == NULL)
+  other_action_name = NULL;
+else if (g_utf8_collate (other, xfwm4) == 0)
+  {
+gint j;
+
+/* We need to get the human readable string of the action name */
+for (j = 0; xfwm4_shortcut_values[j].name != NULL; ++j)
+if (G_UNLIKELY (g_str_equal (xfwm4_shortcut_values[j].feature,
+ other_action)))
+  {
+other_action_name =
+  g_markup_escape_text (xfwm4_shortcut_values[j].name, -1);
+break;
+  }
+  }
+else
+  other_action_name = g_markup_escape_text (other_action, -1);
 
 secondary_text = g_strdup_printf (_(conflict_messages[i].message), 
other_action_name);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Move xfwm4 shortcut names to libxfce4kbd-private.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to c08f561880fcf5633b48549aef8b11710b6ded37 (commit)
   from 128a25d53a689896f29a0936d0d686478c107aa7 (commit)

commit c08f561880fcf5633b48549aef8b11710b6ded37
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 17:38:10 2012 +0100

Move xfwm4 shortcut names to libxfce4kbd-private.

 libxfce4kbd-private/Makefile.am |3 +-
 libxfce4kbd-private/xfwm4-shortcut-values.h |  106 +++
 2 files changed, 108 insertions(+), 1 deletions(-)

diff --git a/libxfce4kbd-private/Makefile.am b/libxfce4kbd-private/Makefile.am
index 145d175..b9b438f 100644
--- a/libxfce4kbd-private/Makefile.am
+++ b/libxfce4kbd-private/Makefile.am
@@ -15,7 +15,8 @@ libxfce4kbd_headers = \
xfce-shortcuts-provider.h \
xfce-shortcuts-grabber.h \
xfce-shortcut-dialog.h \
-   xfce-shortcuts.h
+   xfce-shortcuts.h \
+   xfwm4-shortcut-values.h
 
 libxfce4kbd_built_sources = \
xfce-shortcuts-marshal.c \
diff --git a/libxfce4kbd-private/xfwm4-shortcut-values.h 
b/libxfce4kbd-private/xfwm4-shortcut-values.h
new file mode 100644
index 000..4bd32ef
--- /dev/null
+++ b/libxfce4kbd-private/xfwm4-shortcut-values.h
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2008 Stephan Arts step...@xfce.org
+ * Copyright (c) 2008 Jannis Pohlmann jan...@xfce.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * 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
+ * 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., Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include glib.h
+
+typedef struct _ShortcutTemplate ShortcutTemplate;
+
+struct _ShortcutTemplate
+{
+  const gchar *name;
+  const gchar *feature;
+  const gchar *shortcut;
+};
+
+const ShortcutTemplate xfwm4_shortcut_values[] = {
+  { N_(Window operations menu), popup_menu_key, NULL },
+  { N_(Up), up_key, NULL },
+  { N_(Down), down_key, NULL },
+  { N_(Left), left_key, NULL },
+  { N_(Right), right_key, NULL },
+  { N_(Cancel), cancel_key, NULL },
+  { N_(Cycle windows), cycle_windows_key, NULL },
+  { N_(Cycle windows (Reverse)), cycle_reverse_windows_key, NULL },
+  { N_(Switch window for same application), switch_window_key, NULL },
+  { N_(Switch application), switch_application_key, NULL },
+  { N_(Close window), close_window_key, NULL },
+  { N_(Maximize window horizontally), maximize_horiz_key, NULL },
+  { N_(Maximize window vertically), maximize_vert_key, NULL },
+  { N_(Maximize window), maximize_window_key, NULL },
+  { N_(Hide window), hide_window_key, NULL },
+  { N_(Move window), move_window_key, NULL },
+  { N_(Resize window), resize_window_key, NULL },
+  { N_(Shade window), shade_window_key, NULL },
+  { N_(Stick window), stick_window_key, NULL },
+  { N_(Raise window), raise_window_key, NULL },
+  { N_(Lower window), lower_window_key, NULL },
+  { N_(Raise or lower window), raiselower_window_key, NULL },
+  { N_(Fill window), fill_window_key, NULL },
+  { N_(Fill window horizontally), fill_horiz_key, NULL },
+  { N_(Fill window vertically), fill_vert_key, NULL },
+  { N_(Toggle above), above_key, NULL },
+  { N_(Toggle fullscreen), fullscreen_key, NULL },
+  { N_(Move window to upper workspace), move_window_up_workspace_key, NULL 
},
+  { N_(Move window to bottom workspace), move_window_down_workspace_key, 
NULL },
+  { N_(Move window to left workspace), move_window_left_workspace_key, 
NULL },
+  { N_(Move window to right workspace), move_window_right_workspace_key, 
NULL },
+  { N_(Move window to previous workspace), move_window_prev_workspace_key, 
NULL },
+  { N_(Move window to next workspace), move_window_next_workspace_key, 
NULL },
+  { N_(Move window to workspace 1), move_window_workspace_1_key, NULL, },
+  { N_(Move window to workspace 2), move_window_workspace_2_key, NULL, },
+  { N_(Move window to workspace 3), move_window_workspace_3_key, NULL, },
+  { N_(Move window to workspace 4), move_window_workspace_4_key, NULL, },
+  { N_(Move window to workspace 5), move_window_workspace_5_key, NULL, },
+  { N_(Move window to workspace 6), move_window_workspace_6_key, NULL, },
+  { N_(Move window to workspace 7), move_window_workspace_7_key, NULL, },
+  { N_(Move window to workspace 8), move_window_workspace_8_key, NULL, },
+  { N_(Move window to workspace 9), move_window_workspace_9_key, NULL, },
+  { N_(Move window to workspace 10), move_window_workspace_10_key, NULL, },
+  { N_(Move window to workspace 11), 

[Xfce4-commits] libxfce4ui:master Add xfwm4 shortcut values to POTFILES.in

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 8f1bb1455886ee653979fddd3d2aaedf43a0ee2c (commit)
   from 53be9bc959c524a140c89e0649be7bb86f191550 (commit)

commit 8f1bb1455886ee653979fddd3d2aaedf43a0ee2c
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 22:28:07 2012 +0100

Add xfwm4 shortcut values to POTFILES.in

 po/POTFILES.in |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8ad7d7f..55e6864 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -17,6 +17,7 @@ libxfce4kbd-private/xfce-shortcuts.c
 libxfce4kbd-private/xfce-shortcut-dialog.c
 libxfce4kbd-private/xfce-shortcuts-grabber.c
 libxfce4kbd-private/xfce-shortcuts-provider.c
+libxfce4kbd-private/xfwm4-shortcut-values.h
 
 #
 # Support for GtkBuilder
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


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

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 4c2a8a1dd003091288f4b86521ae8f3ff7359370 (commit)
   from f48c83b67cb46f7b64d4d5cd3bb474e7ee4e9b8b (commit)

commit 4c2a8a1dd003091288f4b86521ae8f3ff7359370
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 0d816a2..dcfc235 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 */
@@ -291,12 +295,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,
   };
 
 #if GTK_CHECK_VERSION (3, 0, 0)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Get rid of FinallyGetModifiersForKeycode.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to f48c83b67cb46f7b64d4d5cd3bb474e7ee4e9b8b (commit)
   from 8f1bb1455886ee653979fddd3d2aaedf43a0ee2c (commit)

commit f48c83b67cb46f7b64d4d5cd3bb474e7ee4e9b8b
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 10:32:39 2012 +0100

Get rid of FinallyGetModifiersForKeycode.

It simply does not work as expected and the logic seems boggus.

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

diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c 
b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index 31585b5..0d816a2 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -213,85 +213,21 @@ xfce_shortcuts_grabber_ungrab_all (XfceShortcutsGrabber 
*grabber)
 
 
 
-/* Return the modifier mask that needs to be pressed to produce key in the
- * given group (keyboard layout) and level (shift level).
- *
- * Taken from libkeybinder
- * Copyright (C) 2010 Ulrik Sverdrup ulrik.sverd...@gmail.com
- */
-static GdkModifierType
-FinallyGetModifiersForKeycode (XkbDescPtr xkb,
-   KeyCodekey,
-   uint   group,
-   uint   level)
-{
-  XkbKeyTypeRec *type;
-  intnKeyGroups;
-  inteffectiveGroup;
-  intk;
-
-  nKeyGroups = XkbKeyNumGroups (xkb, key);
-
-  if ((!XkbKeycodeInRange (xkb, key)) || (nKeyGroups == 0))
-return MODIFIERS_ERROR;
-
-  /* Taken from GDK's MyEnhancedXkbTranslateKeyCode */
-  /* find the offset of the effective group */
-  effectiveGroup = group;
-
-  if (effectiveGroup = nKeyGroups)
-{
-  unsigned groupInfo = XkbKeyGroupInfo (xkb,key);
-
-  switch (XkbOutOfRangeGroupAction(groupInfo))
-{
-  default:
-effectiveGroup %= nKeyGroups;
-break;
-  case XkbClampIntoRange:
-effectiveGroup = nKeyGroups-1;
-break;
-  case XkbRedirectIntoRange:
-effectiveGroup = XkbOutOfRangeGroupNumber (groupInfo);
-if (effectiveGroup = nKeyGroups)
-  effectiveGroup = 0;
-break;
-}
-}
-
-  type = XkbKeyKeyType (xkb, key, effectiveGroup);
-
-  for (k = 0; k  type-map_count; k++)
-{
-  if (type-map[k].active  type-map[k].level == level)
-{
-  if (type-preserve)
-return (type-map[k].mods.mask  ~type-preserve[k].mask);
-  else
-return type-map[k].mods.mask;
-}
-}
-
-  return MODIFIERS_NONE;
-}
-
-
-
 static void
 xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
  XfceKey  *key,
  gboolean  grab)
 {
-  GdkKeymapKey *keys;
-  XkbDescPtrxmap;
-  GdkDisplay   *display;
-  GdkKeymap*keymap;
-  gchar*shortcut_name;
-  guint modifiers;
-  guint k;
-  gint  i, j;
-  gint  n_keys;
-  gint  screens;
+  GdkModifierType  numlock_modifier;
+  GdkKeymapKey*keys;
+  GdkDisplay  *display;
+  GdkKeymap   *keymap;
+  gchar   *shortcut_name;
+  guintmodifiers;
+  guintk;
+  gint i, j;
+  gint n_keys;
+  gint screens;
 
   g_return_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber));
   g_return_if_fail (key != NULL);
@@ -324,22 +260,16 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber 
*grabber,
   return;
 }
 
-  xmap = XkbGetMap (GDK_DISPLAY_XDISPLAY (display),
-XkbAllClientInfoMask,
-XkbUseCoreKbd);
-
   /* Get all keys generating keyval */
   if (!gdk_keymap_get_entries_for_keyval (keymap,key-keyval,
   keys, n_keys))
 {
-  XkbFreeClientMap (xmap, 0, TRUE);
   TRACE (Got no keys for keyval);
   return;
 }
 
   if (n_keys == 0)
 {
-  XkbFreeClientMap (xmap, 0, TRUE);
   g_free (keys);
 
   TRACE (Got 0 keys for keyval);
@@ -350,21 +280,8 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
 {
   /* Grab all hardware keys generating keyval */
 
-  GdkModifierType add_modifiers;
-
   TRACE (Keycode: %d, keys[i].keycode);
 
-  add_modifiers = FinallyGetModifiersForKeycode (xmap,
- keys[i].keycode,
- keys[i].group,
- keys[i].level);
-
-  if (add_modifiers == MODIFIERS_ERROR)
-{
-  TRACE (Error when getting modifiers for keycode);
-  continue;
-}
-
   for (j = 0; j  screens; j++)
 {
   /* Do the grab on all screens */
@@ -398,7 +315,7 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
   if (grab)

[Xfce4-commits] libxfce4ui:master Allow passing parent window to conflict dialog.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to b56143b76d5e25ac661252d177cb7f598abfde87 (commit)
   from 4c2a8a1dd003091288f4b86521ae8f3ff7359370 (commit)

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

Allow passing parent window to conflict dialog.

 libxfce4kbd-private/xfce-shortcuts.c |7 ---
 libxfce4kbd-private/xfce-shortcuts.h |3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcuts.c 
b/libxfce4kbd-private/xfce-shortcuts.c
index e569a0e..1985ed4 100644
--- a/libxfce4kbd-private/xfce-shortcuts.c
+++ b/libxfce4kbd-private/xfce-shortcuts.c
@@ -67,7 +67,8 @@ static XfceShortcutConflictMessage conflict_messages[] = {
 
 
 gint
-xfce_shortcut_conflict_dialog (const gchar *owner,
+xfce_shortcut_conflict_dialog (GtkWindow   *parent,
+   const gchar *owner,
const gchar *other,
const gchar *shortcut,
const gchar *owner_action,
@@ -150,7 +151,7 @@ xfce_shortcut_conflict_dialog (const gchar *owner,
 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);
 
-response = xfce_message_dialog (NULL, title, GTK_STOCK_DIALOG_QUESTION,
+response = xfce_message_dialog (parent, title, 
GTK_STOCK_DIALOG_QUESTION,
 title, secondary_text,
 XFCE_BUTTON_TYPE_MIXED, NULL, 
owner_button_text, GTK_RESPONSE_ACCEPT,
 XFCE_BUTTON_TYPE_MIXED, NULL, 
other_button_text, GTK_RESPONSE_REJECT,
@@ -168,7 +169,7 @@ xfce_shortcut_conflict_dialog (const gchar *owner,
 
   if (G_UNLIKELY (!handled))
 {
-  xfce_message_dialog (NULL, title, GTK_STOCK_DIALOG_ERROR,
+  xfce_message_dialog (parent, title, GTK_STOCK_DIALOG_ERROR,
title, _(This shortcut is already being used for 
something else.),
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL);
   response = GTK_RESPONSE_REJECT;
diff --git a/libxfce4kbd-private/xfce-shortcuts.h 
b/libxfce4kbd-private/xfce-shortcuts.h
index 4c7a27a..421c79a 100644
--- a/libxfce4kbd-private/xfce-shortcuts.h
+++ b/libxfce4kbd-private/xfce-shortcuts.h
@@ -26,7 +26,8 @@
 
 G_BEGIN_DECLS
 
-gboolean xfce_shortcut_conflict_dialog (const gchar *owner,
+gboolean xfce_shortcut_conflict_dialog (GtkWindow   *parent,
+const gchar *owner,
 const gchar *other,
 const gchar *shortcut,
 const gchar *owner_action,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Add some debugging information for conflict.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to e5637cc58ae7b44ba0e0ff2cdc797757d23d8f05 (commit)
   from b56143b76d5e25ac661252d177cb7f598abfde87 (commit)

commit e5637cc58ae7b44ba0e0ff2cdc797757d23d8f05
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 23:21:43 2012 +0100

Add some debugging information for conflict.

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

diff --git a/libxfce4kbd-private/xfce-shortcuts.c 
b/libxfce4kbd-private/xfce-shortcuts.c
index 1985ed4..ba8019e 100644
--- a/libxfce4kbd-private/xfce-shortcuts.c
+++ b/libxfce4kbd-private/xfce-shortcuts.c
@@ -114,6 +114,8 @@ xfce_shortcut_conflict_dialog (GtkWindow   *parent,
   {
 gint j;
 
+DBG (Owner action %s is an xfwm4 action, get the string, 
owner_action);
+
 /* We need to get the human readable string of the action name */
 for (j = 0; xfwm4_shortcut_values[j].name != NULL; ++j)
 if (G_UNLIKELY (g_str_equal (xfwm4_shortcut_values[j].feature,
@@ -127,6 +129,8 @@ xfce_shortcut_conflict_dialog (GtkWindow   *parent,
 else
   owner_action_name = g_markup_escape_text (owner_action, -1);
 
+DBG (Owner action name: %s, owner_action_name);
+
 if (other_action == NULL)
   other_action_name = NULL;
 else if (g_utf8_collate (other, xfwm4) == 0)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Show the accelerator label in the shortcut dialog.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to f3ed87bd674c0e7464018082566fbb62a9226628 (commit)
   from e5637cc58ae7b44ba0e0ff2cdc797757d23d8f05 (commit)

commit f3ed87bd674c0e7464018082566fbb62a9226628
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 23:38:22 2012 +0100

Show the accelerator label in the shortcut dialog.

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

diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c 
b/libxfce4kbd-private/xfce-shortcut-dialog.c
index 38e53ea..fc5b6fa 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -357,7 +357,8 @@ xfce_shortcut_dialog_key_pressed (XfceShortcutDialog 
*dialog,
   GdkModifierType  consumed, modifiers;
   guintkeyval, mod_mask;
   gchar   *text;
-  gchar   *shortcut;
+  gchar   *escaped_label;
+  gchar   *label;
 
   g_free (dialog-shortcut);
 
@@ -392,13 +393,16 @@ xfce_shortcut_dialog_key_pressed (XfceShortcutDialog 
*dialog,
   /* Get and store the pressed shortcut */
   dialog-shortcut = gtk_accelerator_name (keyval, modifiers);
 
-  shortcut = g_markup_escape_text (dialog-shortcut, -1);
-  text = g_strdup_printf (span size='large'b%s/b/span, shortcut);
+  label = gtk_accelerator_get_label (keyval, modifiers);
+  escaped_label = g_markup_escape_text (label, -1);
+  text = g_strdup_printf (span size='large'b%s/b/span,
+  escaped_label);
 
   gtk_label_set_markup (GTK_LABEL (dialog-shortcut_label), text);
 
+  g_free (label);
+  g_free (escaped_label);
   g_free (text);
-  g_free (shortcut);
 
   return FALSE;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Improve the UI of the dialog to grab shortcuts.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 76c2d966f23155e7faa40427dbd8a8cc0e26a038 (commit)
   from f3ed87bd674c0e7464018082566fbb62a9226628 (commit)

commit 76c2d966f23155e7faa40427dbd8a8cc0e26a038
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Fri Dec 21 15:05:55 2012 +0100

Improve the UI of the dialog to grab shortcuts.

Add an explanation string to make it clear that the user is expected to
press the keys.

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

diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c 
b/libxfce4kbd-private/xfce-shortcut-dialog.c
index fc5b6fa..f85bff9 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -193,26 +193,35 @@ xfce_shortcut_dialog_create_contents (XfceShortcutDialog 
*dialog,
   const gchar*action_name,
   const gchar*action)
 {
+  GtkWidget   *content_box;
+  GtkWidget   *alignment;
+  GtkWidget   *box;
   GtkWidget   *button;
-  GtkWidget   *table;
   GtkWidget   *label;
+  const gchar *action_type;
   const gchar *title;
-  const gchar *action_label;
+  gchar   *explanation_label;
 
   if (g_utf8_collate (provider, xfwm4) == 0)
 {
   title = _(Window Manager Action Shortcut);
-  action_label = _(Action:);
+  /* TRANSLATORS: this string will be used to create an explanation for
+   * the user in a following string */
+  action_type = _(action);
 }
   else if (g_utf8_collate (provider, commands) == 0)
 {
   title = _(Command Shortcut);
-  action_label = _(Command:);
+  /* TRANSLATORS: this string will be used to create an explanation for
+   * the user in a following string */
+  action_type = _(command);
 }
   else
 {
   title = _(Shortcut);
-  action_label = _(Action:);
+  /* TRANSLATORS: this string will be used to create an explanation for
+   * the user in a following string */
+  action_type = _(action);
 }
 
   /* Set dialog title */
@@ -232,31 +241,55 @@ xfce_shortcut_dialog_create_contents (XfceShortcutDialog 
*dialog,
   gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, 
GTK_RESPONSE_CANCEL);
   gtk_widget_show (button);
 
-  table = gtk_table_new (2, 2, FALSE);
-  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), 12);
-  gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG 
(dialog))), table);
-  gtk_widget_show (table);
-
-  label = gtk_label_new (action_label);
-  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 (action_name);
+  /* Main content container */
+  alignment = gtk_alignment_new (0, 0, 1, 1);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 6, 12, 0);
+  gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG 
(dialog))),
+ alignment);
+  gtk_widget_show (alignment);
+
+  #if GTK_CHECK_VERSION (3, 0, 0)
+  content_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+  #else
+  content_box = gtk_vbox_new (FALSE, 6);
+  #endif
+  gtk_container_set_border_width (GTK_CONTAINER (content_box), 6);
+  gtk_container_add (GTK_CONTAINER (alignment), content_box);
+  gtk_widget_show (content_box);
+
+  /* TRANSLATORS: this creates the explanation for the user. The first %s is 
replaced
+   * by the action type which you translated earlier, the second %s is 
replaced by the
+   * action name which comes from somewhere else.
+   * THE ORDER MUSTN'T BE REVERSED! */
+  explanation_label =
+g_strdup_printf (_(Press now the keyboard keys you want to use to trigger 
the %s '%s'.),
+ action_type, action_name);
+
+  label = gtk_label_new (explanation_label);
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, 0, 1);
+  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+  gtk_container_add (GTK_CONTAINER (content_box), label);
   gtk_widget_show (label);
+  g_free (explanation_label);
+
+  /* Box and labels to display the shortcut currently being grabbed.
+   * It will be updated to key-press events. */
+  #if GTK_CHECK_VERSION (3, 0, 0)
+  box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
+  #else
+  box = gtk_hbox_new (FALSE, 12);
+  #endif
+  gtk_container_add (GTK_CONTAINER (content_box), box);
+  gtk_widget_show (box);
 
   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, 1, 2, GTK_FILL, GTK_FILL, 
0, 0);
+  gtk_container_add (GTK_CONTAINER (box), label);
   gtk_widget_show (label);
 
-  

[Xfce4-commits] libxfce4ui:master Improve explanation label.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 77eded0c2c4dd95e7117db4bce6634f998a825aa (commit)
   from 76c2d966f23155e7faa40427dbd8a8cc0e26a038 (commit)

commit 77eded0c2c4dd95e7117db4bce6634f998a825aa
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:22:29 2012 +0100

Improve explanation label.

Make it italic and escape the text because the command may contain
special caracters.

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

diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c 
b/libxfce4kbd-private/xfce-shortcut-dialog.c
index f85bff9..4fbffc3 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -200,7 +200,9 @@ xfce_shortcut_dialog_create_contents (XfceShortcutDialog 
*dialog,
   GtkWidget   *label;
   const gchar *action_type;
   const gchar *title;
-  gchar   *explanation_label;
+  const gchar *explanation_label;
+  gchar   *explanation_label_escaped;
+  gchar   *explanation_label_markup;
 
   if (g_utf8_collate (provider, xfwm4) == 0)
 {
@@ -264,13 +266,17 @@ xfce_shortcut_dialog_create_contents (XfceShortcutDialog 
*dialog,
   explanation_label =
 g_strdup_printf (_(Press now the keyboard keys you want to use to trigger 
the %s '%s'.),
  action_type, action_name);
+  explanation_label_escaped = g_markup_escape_text (explanation_label, -1);
+  explanation_label_markup = g_strdup_printf (i%s/i, 
explanation_label_escaped);
 
-  label = gtk_label_new (explanation_label);
+  label = gtk_label_new (NULL);
+  gtk_label_set_markup (GTK_LABEL (label), explanation_label_markup);
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
   gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
   gtk_container_add (GTK_CONTAINER (content_box), label);
   gtk_widget_show (label);
-  g_free (explanation_label);
+  g_free (explanation_label_escaped);
+  g_free (explanation_label_markup);
 
   /* Box and labels to display the shortcut currently being grabbed.
* It will be updated to key-press events. */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Use parent when showing warning.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 60ee8b36952ab4fd8157b27cf413f4e74771b898 (commit)
   from 77eded0c2c4dd95e7117db4bce6634f998a825aa (commit)

commit 60ee8b36952ab4fd8157b27cf413f4e74771b898
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:32:33 2012 +0100

Use parent when showing warning.

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

diff --git a/libxfce4kbd-private/xfce-shortcuts.c 
b/libxfce4kbd-private/xfce-shortcuts.c
index ba8019e..45357fb 100644
--- a/libxfce4kbd-private/xfce-shortcuts.c
+++ b/libxfce4kbd-private/xfce-shortcuts.c
@@ -96,7 +96,7 @@ xfce_shortcut_conflict_dialog (GtkWindow   *parent,
   /* This shortcut already exists in the provider, we don't want it twice 
*/
 
   /* Warn the user */
-  xfce_dialog_show_warning (NULL, _(Please use another key combination.),
+  xfce_dialog_show_warning (parent, _(Please use another key 
combination.),
 _(%s already triggers this action.), 
shortcut);
 
   return GTK_RESPONSE_REJECT;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Show shortcut label instead of Gtk accelerator in conflict dialog.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 5ca5fe53554e738200705ea532634e10515c3a1f (commit)
   from 60ee8b36952ab4fd8157b27cf413f4e74771b898 (commit)

commit 5ca5fe53554e738200705ea532634e10515c3a1f
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:44:34 2012 +0100

Show shortcut label instead of Gtk accelerator in conflict dialog.

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

diff --git a/libxfce4kbd-private/xfce-shortcuts.c 
b/libxfce4kbd-private/xfce-shortcuts.c
index 45357fb..85b5cce 100644
--- a/libxfce4kbd-private/xfce-shortcuts.c
+++ b/libxfce4kbd-private/xfce-shortcuts.c
@@ -75,15 +75,22 @@ xfce_shortcut_conflict_dialog (GtkWindow   *parent,
const gchar *other_action,
gboolean ignore_same_provider)
 {
-  gchar   *title;
-  gchar   *secondary_text;
-  gchar   *owner_action_name;
-  gchar   *other_action_name;
-  gchar   *owner_button_text;
-  gchar   *other_button_text;
-  gboolean handled = FALSE;
-  gint response = GTK_RESPONSE_ACCEPT;
-  gint i;
+  GdkModifierType  modifiers;
+  gboolean handled;
+  gchar   *other_action_name;
+  gchar   *other_button_text;
+  gchar   *owner_action_name;
+  gchar   *owner_button_text;
+  gchar   *secondary_text;
+  gchar   *shortcut_label;
+  gchar   *title;
+  guintkeyval;
+  gint response;
+  gint i;
+
+  /* Default values */
+  response = GTK_RESPONSE_ACCEPT;
+  handled = FALSE;
 
   /* Make sure to use the translations from libxfce4ui */
   xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, UTF-8);
@@ -91,18 +98,22 @@ xfce_shortcut_conflict_dialog (GtkWindow   *parent,
   if (g_utf8_collate (owner, other) == 0  ignore_same_provider)
 return GTK_RESPONSE_ACCEPT;
 
+  /* Get the shortcut label */
+  gtk_accelerator_parse (shortcut, keyval, modifiers);
+  shortcut_label = gtk_accelerator_get_label (keyval, modifiers);
+
   if (g_utf8_collate (owner, other) == 0  g_utf8_collate (owner_action, 
other_action) == 0)
 {
   /* This shortcut already exists in the provider, we don't want it twice 
*/
 
   /* Warn the user */
   xfce_dialog_show_warning (parent, _(Please use another key 
combination.),
-_(%s already triggers this action.), 
shortcut);
+_(%s already triggers this action.), 
shortcut_label);
 
   return GTK_RESPONSE_REJECT;
 }
 
-  title = g_strdup_printf (_(Conflicting actions for %s), shortcut);
+  title = g_strdup_printf (_(Conflicting actions for %s), shortcut_label);
 
   for (i = 0; conflict_messages[i].message != NULL; ++i)
 if (g_utf8_collate (conflict_messages[i].owner_name, owner) == 0 
@@ -166,6 +177,7 @@ xfce_shortcut_conflict_dialog (GtkWindow   *parent,
 g_free (secondary_text);
 g_free (other_action_name);
 g_free (owner_action_name);
+g_free (shortcut_label);
 
 handled = TRUE;
 break;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master When refusing a shortcut, show the explanation again.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 154454e31ef4a31293a6200ba74db5448e3c14e4 (commit)
   from 5ca5fe53554e738200705ea532634e10515c3a1f (commit)

commit 154454e31ef4a31293a6200ba74db5448e3c14e4
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:48:17 2012 +0100

When refusing a shortcut, show the explanation again.

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

diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c 
b/libxfce4kbd-private/xfce-shortcut-dialog.c
index 4fbffc3..86aea2e 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -471,7 +471,8 @@ xfce_shortcut_dialog_key_released (XfceShortcutDialog 
*dialog,
   else
 {
   /* Clear label */
-  gtk_label_set_markup (GTK_LABEL (dialog-shortcut_label), );
+  gtk_label_set_markup (GTK_LABEL (dialog-shortcut_label),
+_(No keys pressed yet, proceed.));
 }
 
   return FALSE;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


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

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to e9560f02f5bdad4f8f50b2f72d6c92d0173c0ea2 (commit)
   from 77ff43f265e35163c1b251e2d4b0e556e4e0b0cf (commit)

commit e9560f02f5bdad4f8f50b2f72d6c92d0173c0ea2
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 4c7905a..0519982 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -367,7 +367,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:master Fix indentation.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to ea42d959502588e8cb5e9e08a4bd799bf9718f6d (commit)
   from e9560f02f5bdad4f8f50b2f72d6c92d0173c0ea2 (commit)

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

Fix indentation.

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

diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c 
b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index b8a56e3..a94351d 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -368,7 +368,7 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
   for (j = 0; j  screens; j++)
 {
   /* Do the grab on all screens */
-  Window root_window;
+  Window root_window;
 
   /* Ignorable modifiers */
   guint mod_masks [] = {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Improve key comparison.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to e56596a37ffdb4fe8fda4491466e6f826270accc (commit)
   from ea42d959502588e8cb5e9e08a4bd799bf9718f6d (commit)

commit e56596a37ffdb4fe8fda4491466e6f826270accc
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 a94351d..b8d2898 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -432,6 +432,7 @@ struct EventKeyFindContext
 {
   XfceShortcutsGrabber *grabber;
   GdkModifierType   modifiers;
+  GdkModifierType   consumed;
   guint keyval;
   const gchar  *result;
 };
@@ -443,30 +444,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;
 
@@ -514,13 +498,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:master No need to remove consumed modifiers twice.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 441e8ed5fbe31cab23f76ab8872d423d822b02ae (commit)
   from 9dfbc906f89601f145557fe6846e9ad44a8e9e22 (commit)

commit 441e8ed5fbe31cab23f76ab8872d423d822b02ae
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 dd13f7e..7f194f2 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -432,7 +432,6 @@ struct EventKeyFindContext
 {
   XfceShortcutsGrabber *grabber;
   GdkModifierType   modifiers;
-  GdkModifierType   consumed;
   guint keyval;
   const gchar  *result;
 };
@@ -448,7 +447,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))
 {
@@ -512,7 +511,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:master Fix keyboard shortcuts with Shift modifier (bug #8744).

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 9dfbc906f89601f145557fe6846e9ad44a8e9e22 (commit)
   from e56596a37ffdb4fe8fda4491466e6f826270accc (commit)

commit 9dfbc906f89601f145557fe6846e9ad44a8e9e22
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 0519982..2ee1931 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -371,6 +371,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 b8d2898..dd13f7e 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);
 
@@ -498,6 +498,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;
 
@@ -506,6 +515,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:master Fix alt + print being detected as SysReq (bug #7897).

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 597d9f694ff4d1f8420544936095b92ef1c9873e (commit)
   from 441e8ed5fbe31cab23f76ab8872d423d822b02ae (commit)

commit 597d9f694ff4d1f8420544936095b92ef1c9873e
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 2ee1931..38e53ea 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -370,6 +370,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 7f194f2..31585b5 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -497,6 +497,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:master Move xfwm4 shortcut names to libxfce4kbd-private.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to ad4a603247a5d56dfe25c0b1109c7bec06a9ab7d (commit)
   from 9d0ad9da24e30c314d80a82c8204441f4ace948c (commit)

commit ad4a603247a5d56dfe25c0b1109c7bec06a9ab7d
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 17:38:10 2012 +0100

Move xfwm4 shortcut names to libxfce4kbd-private.

 libxfce4kbd-private/Makefile.am |3 +-
 libxfce4kbd-private/xfwm4-shortcut-values.h |  106 +++
 2 files changed, 108 insertions(+), 1 deletions(-)

diff --git a/libxfce4kbd-private/Makefile.am b/libxfce4kbd-private/Makefile.am
index 145d175..b9b438f 100644
--- a/libxfce4kbd-private/Makefile.am
+++ b/libxfce4kbd-private/Makefile.am
@@ -15,7 +15,8 @@ libxfce4kbd_headers = \
xfce-shortcuts-provider.h \
xfce-shortcuts-grabber.h \
xfce-shortcut-dialog.h \
-   xfce-shortcuts.h
+   xfce-shortcuts.h \
+   xfwm4-shortcut-values.h
 
 libxfce4kbd_built_sources = \
xfce-shortcuts-marshal.c \
diff --git a/libxfce4kbd-private/xfwm4-shortcut-values.h 
b/libxfce4kbd-private/xfwm4-shortcut-values.h
new file mode 100644
index 000..4bd32ef
--- /dev/null
+++ b/libxfce4kbd-private/xfwm4-shortcut-values.h
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2008 Stephan Arts step...@xfce.org
+ * Copyright (c) 2008 Jannis Pohlmann jan...@xfce.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * 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
+ * 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., Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include glib.h
+
+typedef struct _ShortcutTemplate ShortcutTemplate;
+
+struct _ShortcutTemplate
+{
+  const gchar *name;
+  const gchar *feature;
+  const gchar *shortcut;
+};
+
+const ShortcutTemplate xfwm4_shortcut_values[] = {
+  { N_(Window operations menu), popup_menu_key, NULL },
+  { N_(Up), up_key, NULL },
+  { N_(Down), down_key, NULL },
+  { N_(Left), left_key, NULL },
+  { N_(Right), right_key, NULL },
+  { N_(Cancel), cancel_key, NULL },
+  { N_(Cycle windows), cycle_windows_key, NULL },
+  { N_(Cycle windows (Reverse)), cycle_reverse_windows_key, NULL },
+  { N_(Switch window for same application), switch_window_key, NULL },
+  { N_(Switch application), switch_application_key, NULL },
+  { N_(Close window), close_window_key, NULL },
+  { N_(Maximize window horizontally), maximize_horiz_key, NULL },
+  { N_(Maximize window vertically), maximize_vert_key, NULL },
+  { N_(Maximize window), maximize_window_key, NULL },
+  { N_(Hide window), hide_window_key, NULL },
+  { N_(Move window), move_window_key, NULL },
+  { N_(Resize window), resize_window_key, NULL },
+  { N_(Shade window), shade_window_key, NULL },
+  { N_(Stick window), stick_window_key, NULL },
+  { N_(Raise window), raise_window_key, NULL },
+  { N_(Lower window), lower_window_key, NULL },
+  { N_(Raise or lower window), raiselower_window_key, NULL },
+  { N_(Fill window), fill_window_key, NULL },
+  { N_(Fill window horizontally), fill_horiz_key, NULL },
+  { N_(Fill window vertically), fill_vert_key, NULL },
+  { N_(Toggle above), above_key, NULL },
+  { N_(Toggle fullscreen), fullscreen_key, NULL },
+  { N_(Move window to upper workspace), move_window_up_workspace_key, NULL 
},
+  { N_(Move window to bottom workspace), move_window_down_workspace_key, 
NULL },
+  { N_(Move window to left workspace), move_window_left_workspace_key, 
NULL },
+  { N_(Move window to right workspace), move_window_right_workspace_key, 
NULL },
+  { N_(Move window to previous workspace), move_window_prev_workspace_key, 
NULL },
+  { N_(Move window to next workspace), move_window_next_workspace_key, 
NULL },
+  { N_(Move window to workspace 1), move_window_workspace_1_key, NULL, },
+  { N_(Move window to workspace 2), move_window_workspace_2_key, NULL, },
+  { N_(Move window to workspace 3), move_window_workspace_3_key, NULL, },
+  { N_(Move window to workspace 4), move_window_workspace_4_key, NULL, },
+  { N_(Move window to workspace 5), move_window_workspace_5_key, NULL, },
+  { N_(Move window to workspace 6), move_window_workspace_6_key, NULL, },
+  { N_(Move window to workspace 7), move_window_workspace_7_key, NULL, },
+  { N_(Move window to workspace 8), move_window_workspace_8_key, NULL, },
+  { N_(Move window to workspace 9), move_window_workspace_9_key, NULL, },
+  { N_(Move window to workspace 10), move_window_workspace_10_key, NULL, },
+  { N_(Move window to workspace 11), 

[Xfce4-commits] libxfce4ui:master Show the window manager action name when conflicting.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 4266240b57661eea9620643ab7c091a265d9b507 (commit)
   from ad4a603247a5d56dfe25c0b1109c7bec06a9ab7d (commit)

commit 4266240b57661eea9620643ab7c091a265d9b507
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 22:26:09 2012 +0100

Show the window manager action name when conflicting.

We use the translated string representing the window manager action so
that the conflict is easy to understand.

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

diff --git a/libxfce4kbd-private/xfce-shortcuts.c 
b/libxfce4kbd-private/xfce-shortcuts.c
index fa417c9..e569a0e 100644
--- a/libxfce4kbd-private/xfce-shortcuts.c
+++ b/libxfce4kbd-private/xfce-shortcuts.c
@@ -33,6 +33,7 @@
 #include xfconf/xfconf.h
 
 #include libxfce4kbd-private/xfce-shortcuts.h
+#include libxfce4kbd-private/xfwm4-shortcut-values.h
 
 
 
@@ -49,8 +50,8 @@ typedef struct
 
 static XfceShortcutConflictMessage conflict_messages[] = {
   { xfwm4, xfwm4,
-N_(This shortcut is already being used for another window manager action. 
Which action do you want to use?),
-N_(Use '%s'), N_(Keep the other one) },
+N_(This shortcut is already being used for the action '%s'. Which action 
do you want to use?),
+N_(Use '%s'), N_(Keep '%s') },
   { xfwm4, commands,
 N_(This shortcut is already being used for the command '%s'. Which action 
do you want to use?),
 N_(Use '%s'), N_(Keep '%s') },
@@ -58,8 +59,8 @@ static XfceShortcutConflictMessage conflict_messages[] = {
 N_(This shortcut is already being used for the command '%s'. Which action 
do you want to use?),
 N_(Use '%s'), N_(Keep '%s') },
   { commands, xfwm4,
-N_(This shortcut is already being used by a window manager action. Which 
action do you want to use?),
-N_(Use '%s'), N_(Keep the window manager action) },
+N_(This shortcut is already being used by the action '%s'. Which action 
do you want to use?),
+N_(Use '%s'), N_(Keep '%s') },
   { 0, 0, NULL, NULL, NULL },
 };
 
@@ -106,8 +107,43 @@ xfce_shortcut_conflict_dialog (const gchar *owner,
 if (g_utf8_collate (conflict_messages[i].owner_name, owner) == 0 
 g_utf8_collate (conflict_messages[i].other_name, other) == 0)
   {
-owner_action_name = owner_action == NULL ? NULL : g_markup_escape_text 
(owner_action, -1);
-other_action_name = other_action == NULL ? NULL : g_markup_escape_text 
(other_action, -1);
+if (owner_action == NULL)
+  owner_action_name = NULL;
+else if (g_utf8_collate (owner, xfwm4) == 0)
+  {
+gint j;
+
+/* We need to get the human readable string of the action name */
+for (j = 0; xfwm4_shortcut_values[j].name != NULL; ++j)
+if (G_UNLIKELY (g_str_equal (xfwm4_shortcut_values[j].feature,
+ owner_action)))
+  {
+owner_action_name =
+  g_markup_escape_text (xfwm4_shortcut_values[j].name, -1);
+break;
+  }
+  }
+else
+  owner_action_name = g_markup_escape_text (owner_action, -1);
+
+if (other_action == NULL)
+  other_action_name = NULL;
+else if (g_utf8_collate (other, xfwm4) == 0)
+  {
+gint j;
+
+/* We need to get the human readable string of the action name */
+for (j = 0; xfwm4_shortcut_values[j].name != NULL; ++j)
+if (G_UNLIKELY (g_str_equal (xfwm4_shortcut_values[j].feature,
+ other_action)))
+  {
+other_action_name =
+  g_markup_escape_text (xfwm4_shortcut_values[j].name, -1);
+break;
+  }
+  }
+else
+  other_action_name = g_markup_escape_text (other_action, -1);
 
 secondary_text = g_strdup_printf (_(conflict_messages[i].message), 
other_action_name);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Add xfwm4 shortcut values to POTFILES.in

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 48f729834b39fc56538f7ad5dd8cd21429605d7f (commit)
   from 4266240b57661eea9620643ab7c091a265d9b507 (commit)

commit 48f729834b39fc56538f7ad5dd8cd21429605d7f
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 22:28:07 2012 +0100

Add xfwm4 shortcut values to POTFILES.in

 po/POTFILES.in |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8ad7d7f..55e6864 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -17,6 +17,7 @@ libxfce4kbd-private/xfce-shortcuts.c
 libxfce4kbd-private/xfce-shortcut-dialog.c
 libxfce4kbd-private/xfce-shortcuts-grabber.c
 libxfce4kbd-private/xfce-shortcuts-provider.c
+libxfce4kbd-private/xfwm4-shortcut-values.h
 
 #
 # Support for GtkBuilder
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


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

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 6633a2deed6ab60fbb02c157a8c9499c1824fb4e (commit)
   from 32a1221559da5a8ca47721607825c765ef83ab9f (commit)

commit 6633a2deed6ab60fbb02c157a8c9499c1824fb4e
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 0d816a2..dcfc235 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 */
@@ -291,12 +295,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,
   };
 
 #if GTK_CHECK_VERSION (3, 0, 0)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Get rid of FinallyGetModifiersForKeycode.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 32a1221559da5a8ca47721607825c765ef83ab9f (commit)
   from 48f729834b39fc56538f7ad5dd8cd21429605d7f (commit)

commit 32a1221559da5a8ca47721607825c765ef83ab9f
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 10:32:39 2012 +0100

Get rid of FinallyGetModifiersForKeycode.

It simply does not work as expected and the logic seems boggus.

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

diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c 
b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index 31585b5..0d816a2 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -213,85 +213,21 @@ xfce_shortcuts_grabber_ungrab_all (XfceShortcutsGrabber 
*grabber)
 
 
 
-/* Return the modifier mask that needs to be pressed to produce key in the
- * given group (keyboard layout) and level (shift level).
- *
- * Taken from libkeybinder
- * Copyright (C) 2010 Ulrik Sverdrup ulrik.sverd...@gmail.com
- */
-static GdkModifierType
-FinallyGetModifiersForKeycode (XkbDescPtr xkb,
-   KeyCodekey,
-   uint   group,
-   uint   level)
-{
-  XkbKeyTypeRec *type;
-  intnKeyGroups;
-  inteffectiveGroup;
-  intk;
-
-  nKeyGroups = XkbKeyNumGroups (xkb, key);
-
-  if ((!XkbKeycodeInRange (xkb, key)) || (nKeyGroups == 0))
-return MODIFIERS_ERROR;
-
-  /* Taken from GDK's MyEnhancedXkbTranslateKeyCode */
-  /* find the offset of the effective group */
-  effectiveGroup = group;
-
-  if (effectiveGroup = nKeyGroups)
-{
-  unsigned groupInfo = XkbKeyGroupInfo (xkb,key);
-
-  switch (XkbOutOfRangeGroupAction(groupInfo))
-{
-  default:
-effectiveGroup %= nKeyGroups;
-break;
-  case XkbClampIntoRange:
-effectiveGroup = nKeyGroups-1;
-break;
-  case XkbRedirectIntoRange:
-effectiveGroup = XkbOutOfRangeGroupNumber (groupInfo);
-if (effectiveGroup = nKeyGroups)
-  effectiveGroup = 0;
-break;
-}
-}
-
-  type = XkbKeyKeyType (xkb, key, effectiveGroup);
-
-  for (k = 0; k  type-map_count; k++)
-{
-  if (type-map[k].active  type-map[k].level == level)
-{
-  if (type-preserve)
-return (type-map[k].mods.mask  ~type-preserve[k].mask);
-  else
-return type-map[k].mods.mask;
-}
-}
-
-  return MODIFIERS_NONE;
-}
-
-
-
 static void
 xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
  XfceKey  *key,
  gboolean  grab)
 {
-  GdkKeymapKey *keys;
-  XkbDescPtrxmap;
-  GdkDisplay   *display;
-  GdkKeymap*keymap;
-  gchar*shortcut_name;
-  guint modifiers;
-  guint k;
-  gint  i, j;
-  gint  n_keys;
-  gint  screens;
+  GdkModifierType  numlock_modifier;
+  GdkKeymapKey*keys;
+  GdkDisplay  *display;
+  GdkKeymap   *keymap;
+  gchar   *shortcut_name;
+  guintmodifiers;
+  guintk;
+  gint i, j;
+  gint n_keys;
+  gint screens;
 
   g_return_if_fail (XFCE_IS_SHORTCUTS_GRABBER (grabber));
   g_return_if_fail (key != NULL);
@@ -324,22 +260,16 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber 
*grabber,
   return;
 }
 
-  xmap = XkbGetMap (GDK_DISPLAY_XDISPLAY (display),
-XkbAllClientInfoMask,
-XkbUseCoreKbd);
-
   /* Get all keys generating keyval */
   if (!gdk_keymap_get_entries_for_keyval (keymap,key-keyval,
   keys, n_keys))
 {
-  XkbFreeClientMap (xmap, 0, TRUE);
   TRACE (Got no keys for keyval);
   return;
 }
 
   if (n_keys == 0)
 {
-  XkbFreeClientMap (xmap, 0, TRUE);
   g_free (keys);
 
   TRACE (Got 0 keys for keyval);
@@ -350,21 +280,8 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
 {
   /* Grab all hardware keys generating keyval */
 
-  GdkModifierType add_modifiers;
-
   TRACE (Keycode: %d, keys[i].keycode);
 
-  add_modifiers = FinallyGetModifiersForKeycode (xmap,
- keys[i].keycode,
- keys[i].group,
- keys[i].level);
-
-  if (add_modifiers == MODIFIERS_ERROR)
-{
-  TRACE (Error when getting modifiers for keycode);
-  continue;
-}
-
   for (j = 0; j  screens; j++)
 {
   /* Do the grab on all screens */
@@ -398,7 +315,7 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
   if (grab)

[Xfce4-commits] libxfce4ui:master Allow passing parent window to conflict dialog.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to f30f9742e64ea5ec3b23d977b904f24799d773d6 (commit)
   from 6633a2deed6ab60fbb02c157a8c9499c1824fb4e (commit)

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

Allow passing parent window to conflict dialog.

 libxfce4kbd-private/xfce-shortcuts.c |7 ---
 libxfce4kbd-private/xfce-shortcuts.h |3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcuts.c 
b/libxfce4kbd-private/xfce-shortcuts.c
index e569a0e..1985ed4 100644
--- a/libxfce4kbd-private/xfce-shortcuts.c
+++ b/libxfce4kbd-private/xfce-shortcuts.c
@@ -67,7 +67,8 @@ static XfceShortcutConflictMessage conflict_messages[] = {
 
 
 gint
-xfce_shortcut_conflict_dialog (const gchar *owner,
+xfce_shortcut_conflict_dialog (GtkWindow   *parent,
+   const gchar *owner,
const gchar *other,
const gchar *shortcut,
const gchar *owner_action,
@@ -150,7 +151,7 @@ xfce_shortcut_conflict_dialog (const gchar *owner,
 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);
 
-response = xfce_message_dialog (NULL, title, GTK_STOCK_DIALOG_QUESTION,
+response = xfce_message_dialog (parent, title, 
GTK_STOCK_DIALOG_QUESTION,
 title, secondary_text,
 XFCE_BUTTON_TYPE_MIXED, NULL, 
owner_button_text, GTK_RESPONSE_ACCEPT,
 XFCE_BUTTON_TYPE_MIXED, NULL, 
other_button_text, GTK_RESPONSE_REJECT,
@@ -168,7 +169,7 @@ xfce_shortcut_conflict_dialog (const gchar *owner,
 
   if (G_UNLIKELY (!handled))
 {
-  xfce_message_dialog (NULL, title, GTK_STOCK_DIALOG_ERROR,
+  xfce_message_dialog (parent, title, GTK_STOCK_DIALOG_ERROR,
title, _(This shortcut is already being used for 
something else.),
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL);
   response = GTK_RESPONSE_REJECT;
diff --git a/libxfce4kbd-private/xfce-shortcuts.h 
b/libxfce4kbd-private/xfce-shortcuts.h
index 4c7a27a..421c79a 100644
--- a/libxfce4kbd-private/xfce-shortcuts.h
+++ b/libxfce4kbd-private/xfce-shortcuts.h
@@ -26,7 +26,8 @@
 
 G_BEGIN_DECLS
 
-gboolean xfce_shortcut_conflict_dialog (const gchar *owner,
+gboolean xfce_shortcut_conflict_dialog (GtkWindow   *parent,
+const gchar *owner,
 const gchar *other,
 const gchar *shortcut,
 const gchar *owner_action,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Add some debugging information for conflict.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 173f728069b313c4091120a81565bd4ef13fad51 (commit)
   from f30f9742e64ea5ec3b23d977b904f24799d773d6 (commit)

commit 173f728069b313c4091120a81565bd4ef13fad51
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 23:21:43 2012 +0100

Add some debugging information for conflict.

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

diff --git a/libxfce4kbd-private/xfce-shortcuts.c 
b/libxfce4kbd-private/xfce-shortcuts.c
index 1985ed4..ba8019e 100644
--- a/libxfce4kbd-private/xfce-shortcuts.c
+++ b/libxfce4kbd-private/xfce-shortcuts.c
@@ -114,6 +114,8 @@ xfce_shortcut_conflict_dialog (GtkWindow   *parent,
   {
 gint j;
 
+DBG (Owner action %s is an xfwm4 action, get the string, 
owner_action);
+
 /* We need to get the human readable string of the action name */
 for (j = 0; xfwm4_shortcut_values[j].name != NULL; ++j)
 if (G_UNLIKELY (g_str_equal (xfwm4_shortcut_values[j].feature,
@@ -127,6 +129,8 @@ xfce_shortcut_conflict_dialog (GtkWindow   *parent,
 else
   owner_action_name = g_markup_escape_text (owner_action, -1);
 
+DBG (Owner action name: %s, owner_action_name);
+
 if (other_action == NULL)
   other_action_name = NULL;
 else if (g_utf8_collate (other, xfwm4) == 0)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Show the accelerator label in the shortcut dialog.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to f29fa617c47ac595d4c13095eb210fdf0b54aad2 (commit)
   from 173f728069b313c4091120a81565bd4ef13fad51 (commit)

commit f29fa617c47ac595d4c13095eb210fdf0b54aad2
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 23:38:22 2012 +0100

Show the accelerator label in the shortcut dialog.

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

diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c 
b/libxfce4kbd-private/xfce-shortcut-dialog.c
index 38e53ea..fc5b6fa 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -357,7 +357,8 @@ xfce_shortcut_dialog_key_pressed (XfceShortcutDialog 
*dialog,
   GdkModifierType  consumed, modifiers;
   guintkeyval, mod_mask;
   gchar   *text;
-  gchar   *shortcut;
+  gchar   *escaped_label;
+  gchar   *label;
 
   g_free (dialog-shortcut);
 
@@ -392,13 +393,16 @@ xfce_shortcut_dialog_key_pressed (XfceShortcutDialog 
*dialog,
   /* Get and store the pressed shortcut */
   dialog-shortcut = gtk_accelerator_name (keyval, modifiers);
 
-  shortcut = g_markup_escape_text (dialog-shortcut, -1);
-  text = g_strdup_printf (span size='large'b%s/b/span, shortcut);
+  label = gtk_accelerator_get_label (keyval, modifiers);
+  escaped_label = g_markup_escape_text (label, -1);
+  text = g_strdup_printf (span size='large'b%s/b/span,
+  escaped_label);
 
   gtk_label_set_markup (GTK_LABEL (dialog-shortcut_label), text);
 
+  g_free (label);
+  g_free (escaped_label);
   g_free (text);
-  g_free (shortcut);
 
   return FALSE;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Improve explanation label.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 4f0d394aec8618acea49a030873cc271fd4253b6 (commit)
   from 3e158dc0c8b3cbca57d2af07f13780d3337d1ce5 (commit)

commit 4f0d394aec8618acea49a030873cc271fd4253b6
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:22:29 2012 +0100

Improve explanation label.

Make it italic and escape the text because the command may contain
special caracters.

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

diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c 
b/libxfce4kbd-private/xfce-shortcut-dialog.c
index f85bff9..4fbffc3 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -200,7 +200,9 @@ xfce_shortcut_dialog_create_contents (XfceShortcutDialog 
*dialog,
   GtkWidget   *label;
   const gchar *action_type;
   const gchar *title;
-  gchar   *explanation_label;
+  const gchar *explanation_label;
+  gchar   *explanation_label_escaped;
+  gchar   *explanation_label_markup;
 
   if (g_utf8_collate (provider, xfwm4) == 0)
 {
@@ -264,13 +266,17 @@ xfce_shortcut_dialog_create_contents (XfceShortcutDialog 
*dialog,
   explanation_label =
 g_strdup_printf (_(Press now the keyboard keys you want to use to trigger 
the %s '%s'.),
  action_type, action_name);
+  explanation_label_escaped = g_markup_escape_text (explanation_label, -1);
+  explanation_label_markup = g_strdup_printf (i%s/i, 
explanation_label_escaped);
 
-  label = gtk_label_new (explanation_label);
+  label = gtk_label_new (NULL);
+  gtk_label_set_markup (GTK_LABEL (label), explanation_label_markup);
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
   gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
   gtk_container_add (GTK_CONTAINER (content_box), label);
   gtk_widget_show (label);
-  g_free (explanation_label);
+  g_free (explanation_label_escaped);
+  g_free (explanation_label_markup);
 
   /* Box and labels to display the shortcut currently being grabbed.
* It will be updated to key-press events. */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Improve the UI of the dialog to grab shortcuts.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 3e158dc0c8b3cbca57d2af07f13780d3337d1ce5 (commit)
   from f29fa617c47ac595d4c13095eb210fdf0b54aad2 (commit)

commit 3e158dc0c8b3cbca57d2af07f13780d3337d1ce5
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Fri Dec 21 15:05:55 2012 +0100

Improve the UI of the dialog to grab shortcuts.

Add an explanation string to make it clear that the user is expected to
press the keys.

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

diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c 
b/libxfce4kbd-private/xfce-shortcut-dialog.c
index fc5b6fa..f85bff9 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -193,26 +193,35 @@ xfce_shortcut_dialog_create_contents (XfceShortcutDialog 
*dialog,
   const gchar*action_name,
   const gchar*action)
 {
+  GtkWidget   *content_box;
+  GtkWidget   *alignment;
+  GtkWidget   *box;
   GtkWidget   *button;
-  GtkWidget   *table;
   GtkWidget   *label;
+  const gchar *action_type;
   const gchar *title;
-  const gchar *action_label;
+  gchar   *explanation_label;
 
   if (g_utf8_collate (provider, xfwm4) == 0)
 {
   title = _(Window Manager Action Shortcut);
-  action_label = _(Action:);
+  /* TRANSLATORS: this string will be used to create an explanation for
+   * the user in a following string */
+  action_type = _(action);
 }
   else if (g_utf8_collate (provider, commands) == 0)
 {
   title = _(Command Shortcut);
-  action_label = _(Command:);
+  /* TRANSLATORS: this string will be used to create an explanation for
+   * the user in a following string */
+  action_type = _(command);
 }
   else
 {
   title = _(Shortcut);
-  action_label = _(Action:);
+  /* TRANSLATORS: this string will be used to create an explanation for
+   * the user in a following string */
+  action_type = _(action);
 }
 
   /* Set dialog title */
@@ -232,31 +241,55 @@ xfce_shortcut_dialog_create_contents (XfceShortcutDialog 
*dialog,
   gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, 
GTK_RESPONSE_CANCEL);
   gtk_widget_show (button);
 
-  table = gtk_table_new (2, 2, FALSE);
-  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), 12);
-  gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG 
(dialog))), table);
-  gtk_widget_show (table);
-
-  label = gtk_label_new (action_label);
-  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 (action_name);
+  /* Main content container */
+  alignment = gtk_alignment_new (0, 0, 1, 1);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 6, 12, 0);
+  gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG 
(dialog))),
+ alignment);
+  gtk_widget_show (alignment);
+
+  #if GTK_CHECK_VERSION (3, 0, 0)
+  content_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+  #else
+  content_box = gtk_vbox_new (FALSE, 6);
+  #endif
+  gtk_container_set_border_width (GTK_CONTAINER (content_box), 6);
+  gtk_container_add (GTK_CONTAINER (alignment), content_box);
+  gtk_widget_show (content_box);
+
+  /* TRANSLATORS: this creates the explanation for the user. The first %s is 
replaced
+   * by the action type which you translated earlier, the second %s is 
replaced by the
+   * action name which comes from somewhere else.
+   * THE ORDER MUSTN'T BE REVERSED! */
+  explanation_label =
+g_strdup_printf (_(Press now the keyboard keys you want to use to trigger 
the %s '%s'.),
+ action_type, action_name);
+
+  label = gtk_label_new (explanation_label);
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, 0, 1);
+  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+  gtk_container_add (GTK_CONTAINER (content_box), label);
   gtk_widget_show (label);
+  g_free (explanation_label);
+
+  /* Box and labels to display the shortcut currently being grabbed.
+   * It will be updated to key-press events. */
+  #if GTK_CHECK_VERSION (3, 0, 0)
+  box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
+  #else
+  box = gtk_hbox_new (FALSE, 12);
+  #endif
+  gtk_container_add (GTK_CONTAINER (content_box), box);
+  gtk_widget_show (box);
 
   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, 1, 2, GTK_FILL, GTK_FILL, 
0, 0);
+  gtk_container_add (GTK_CONTAINER (box), label);
   gtk_widget_show (label);
 
-  

[Xfce4-commits] libxfce4ui:master Use parent when showing warning.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 7e1349870e58425e92b05fd143c4c2d55775d966 (commit)
   from 4f0d394aec8618acea49a030873cc271fd4253b6 (commit)

commit 7e1349870e58425e92b05fd143c4c2d55775d966
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:32:33 2012 +0100

Use parent when showing warning.

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

diff --git a/libxfce4kbd-private/xfce-shortcuts.c 
b/libxfce4kbd-private/xfce-shortcuts.c
index ba8019e..45357fb 100644
--- a/libxfce4kbd-private/xfce-shortcuts.c
+++ b/libxfce4kbd-private/xfce-shortcuts.c
@@ -96,7 +96,7 @@ xfce_shortcut_conflict_dialog (GtkWindow   *parent,
   /* This shortcut already exists in the provider, we don't want it twice 
*/
 
   /* Warn the user */
-  xfce_dialog_show_warning (NULL, _(Please use another key combination.),
+  xfce_dialog_show_warning (parent, _(Please use another key 
combination.),
 _(%s already triggers this action.), 
shortcut);
 
   return GTK_RESPONSE_REJECT;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Show shortcut label instead of Gtk accelerator in conflict dialog.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to bae2a6eb8ad188585510cd2f8b0ea84ea381d36f (commit)
   from 7e1349870e58425e92b05fd143c4c2d55775d966 (commit)

commit bae2a6eb8ad188585510cd2f8b0ea84ea381d36f
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:44:34 2012 +0100

Show shortcut label instead of Gtk accelerator in conflict dialog.

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

diff --git a/libxfce4kbd-private/xfce-shortcuts.c 
b/libxfce4kbd-private/xfce-shortcuts.c
index 45357fb..85b5cce 100644
--- a/libxfce4kbd-private/xfce-shortcuts.c
+++ b/libxfce4kbd-private/xfce-shortcuts.c
@@ -75,15 +75,22 @@ xfce_shortcut_conflict_dialog (GtkWindow   *parent,
const gchar *other_action,
gboolean ignore_same_provider)
 {
-  gchar   *title;
-  gchar   *secondary_text;
-  gchar   *owner_action_name;
-  gchar   *other_action_name;
-  gchar   *owner_button_text;
-  gchar   *other_button_text;
-  gboolean handled = FALSE;
-  gint response = GTK_RESPONSE_ACCEPT;
-  gint i;
+  GdkModifierType  modifiers;
+  gboolean handled;
+  gchar   *other_action_name;
+  gchar   *other_button_text;
+  gchar   *owner_action_name;
+  gchar   *owner_button_text;
+  gchar   *secondary_text;
+  gchar   *shortcut_label;
+  gchar   *title;
+  guintkeyval;
+  gint response;
+  gint i;
+
+  /* Default values */
+  response = GTK_RESPONSE_ACCEPT;
+  handled = FALSE;
 
   /* Make sure to use the translations from libxfce4ui */
   xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, UTF-8);
@@ -91,18 +98,22 @@ xfce_shortcut_conflict_dialog (GtkWindow   *parent,
   if (g_utf8_collate (owner, other) == 0  ignore_same_provider)
 return GTK_RESPONSE_ACCEPT;
 
+  /* Get the shortcut label */
+  gtk_accelerator_parse (shortcut, keyval, modifiers);
+  shortcut_label = gtk_accelerator_get_label (keyval, modifiers);
+
   if (g_utf8_collate (owner, other) == 0  g_utf8_collate (owner_action, 
other_action) == 0)
 {
   /* This shortcut already exists in the provider, we don't want it twice 
*/
 
   /* Warn the user */
   xfce_dialog_show_warning (parent, _(Please use another key 
combination.),
-_(%s already triggers this action.), 
shortcut);
+_(%s already triggers this action.), 
shortcut_label);
 
   return GTK_RESPONSE_REJECT;
 }
 
-  title = g_strdup_printf (_(Conflicting actions for %s), shortcut);
+  title = g_strdup_printf (_(Conflicting actions for %s), shortcut_label);
 
   for (i = 0; conflict_messages[i].message != NULL; ++i)
 if (g_utf8_collate (conflict_messages[i].owner_name, owner) == 0 
@@ -166,6 +177,7 @@ xfce_shortcut_conflict_dialog (GtkWindow   *parent,
 g_free (secondary_text);
 g_free (other_action_name);
 g_free (owner_action_name);
+g_free (shortcut_label);
 
 handled = TRUE;
 break;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master When refusing a shortcut, show the explanation again.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to eb0b1df12eccfbcc7ed92656a7094ae45eba68a4 (commit)
   from bae2a6eb8ad188585510cd2f8b0ea84ea381d36f (commit)

commit eb0b1df12eccfbcc7ed92656a7094ae45eba68a4
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:48:17 2012 +0100

When refusing a shortcut, show the explanation again.

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

diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c 
b/libxfce4kbd-private/xfce-shortcut-dialog.c
index 4fbffc3..86aea2e 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -471,7 +471,8 @@ xfce_shortcut_dialog_key_released (XfceShortcutDialog 
*dialog,
   else
 {
   /* Clear label */
-  gtk_label_set_markup (GTK_LABEL (dialog-shortcut_label), );
+  gtk_label_set_markup (GTK_LABEL (dialog-shortcut_label),
+_(No keys pressed yet, proceed.));
 }
 
   return FALSE;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Merge branch 'jeromeg/keyboard-shortcuts' of ssh://git.xfce.org/xfce/libxfce4ui into jeromeg/keyboard-shortcuts

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to f79efc609adea4155683c5d3cf381823f60ce95c (commit)
   from dcac544ec6c81e0f1e1b024b32ad56f753ea75c1 (commit)

commit f79efc609adea4155683c5d3cf381823f60ce95c
Merge: dcac544 154454e
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Fri Dec 28 15:52:00 2012 +0100

Merge branch 'jeromeg/keyboard-shortcuts' of 
ssh://git.xfce.org/xfce/libxfce4ui into jeromeg/keyboard-shortcuts

commit 154454e31ef4a31293a6200ba74db5448e3c14e4
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:48:17 2012 +0100

When refusing a shortcut, show the explanation again.

commit 5ca5fe53554e738200705ea532634e10515c3a1f
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:44:34 2012 +0100

Show shortcut label instead of Gtk accelerator in conflict dialog.

commit 60ee8b36952ab4fd8157b27cf413f4e74771b898
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:32:33 2012 +0100

Use parent when showing warning.

commit 77eded0c2c4dd95e7117db4bce6634f998a825aa
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 22 10:22:29 2012 +0100

Improve explanation label.

Make it italic and escape the text because the command may contain
special caracters.

commit 76c2d966f23155e7faa40427dbd8a8cc0e26a038
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Fri Dec 21 15:05:55 2012 +0100

Improve the UI of the dialog to grab shortcuts.

Add an explanation string to make it clear that the user is expected to
press the keys.

commit f3ed87bd674c0e7464018082566fbb62a9226628
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 23:38:22 2012 +0100

Show the accelerator label in the shortcut dialog.

commit e5637cc58ae7b44ba0e0ff2cdc797757d23d8f05
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 23:21:43 2012 +0100

Add some debugging information for conflict.

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

Allow passing parent window to conflict dialog.

commit 4c2a8a1dd003091288f4b86521ae8f3ff7359370
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.

commit f48c83b67cb46f7b64d4d5cd3bb474e7ee4e9b8b
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 10:32:39 2012 +0100

Get rid of FinallyGetModifiersForKeycode.

It simply does not work as expected and the logic seems boggus.

commit 8f1bb1455886ee653979fddd3d2aaedf43a0ee2c
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 22:28:07 2012 +0100

Add xfwm4 shortcut values to POTFILES.in

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

Show the window manager action name when conflicting.

We use the translated string representing the window manager action so
that the conflict is easy to understand.

commit c08f561880fcf5633b48549aef8b11710b6ded37
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 17:38:10 2012 +0100

Move xfwm4 shortcut names to libxfce4kbd-private.

commit 128a25d53a689896f29a0936d0d686478c107aa7
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.

commit 0d2c165aeff3da0268276cbc75f9470bfc349e4b
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.

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

No need to remove consumed modifiers twice.

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

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

commit 3bb8c7d4de8132741da54a26c98459167c51fd87
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.

commit 160d4fe42952284a4bcc48760ae6706ca28fa7e5
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Tue Dec 18 

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

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to a8c6cd3340203a7229746116e294bbf3a0dc713b (commit)
   from f79efc609adea4155683c5d3cf381823f60ce95c (commit)

commit a8c6cd3340203a7229746116e294bbf3a0dc713b
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 dcfc235..a7632fa 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -443,17 +443,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:master Primary and Control now conflict.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 084d79c43fa7bbb5c284808927a99808d85dc925 (commit)
   from a8c6cd3340203a7229746116e294bbf3a0dc713b (commit)

commit 084d79c43fa7bbb5c284808927a99808d85dc925
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:master Don't get the default display a second time.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 53a93d33534af5b17317487aad531dcce0c4bc60 (commit)
   from 084d79c43fa7bbb5c284808927a99808d85dc925 (commit)

commit 53a93d33534af5b17317487aad531dcce0c4bc60
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 a7632fa..a035fb4 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:master Grab on all root windows when building with GTK+ 3.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to b9f459f6c28796d5140b2a75b4ce05f108214716 (commit)
   from 53a93d33534af5b17317487aad531dcce0c4bc60 (commit)

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

Grab on all root windows when building with GTK+ 3.

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

diff --git a/libxfce4kbd-private/xfce-shortcuts-grabber.c 
b/libxfce4kbd-private/xfce-shortcuts-grabber.c
index a035fb4..211b606 100644
--- a/libxfce4kbd-private/xfce-shortcuts-grabber.c
+++ b/libxfce4kbd-private/xfce-shortcuts-grabber.c
@@ -311,7 +311,7 @@ xfce_shortcuts_grabber_grab (XfceShortcutsGrabber *grabber,
 
 #if GTK_CHECK_VERSION (3, 0, 0)
   /* Retrieve the root window of the screen */
-  root_window = gdk_x11_get_default_root_xwindow ();
+  root_window = GDK_WINDOW_XID (gdk_screen_get_root_window 
(gdk_display_get_screen (display, j)));
 #else
   /* Retrieve the root window of the screen */
   root_window = GDK_WINDOW_XWINDOW (gdk_screen_get_root_window 
(gdk_display_get_screen (display, j)));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Add functions to handle xfwm4 feature names.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 80dc447a8b9236a3c006b0e38009d35891c18891 (commit)
   from b9f459f6c28796d5140b2a75b4ce05f108214716 (commit)

commit 80dc447a8b9236a3c006b0e38009d35891c18891
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 30 14:34:44 2012 +0100

Add functions to handle xfwm4 feature names.

This is used to provide translated versions of the strings to other
applications. Sharing the translations in the header was not working due
to textdomain issues.

 libxfce4kbd-private/Makefile.am |5 +-
 libxfce4kbd-private/xfce-shortcuts-xfwm4.c  |  146 +++
 libxfce4kbd-private/xfce-shortcuts-xfwm4.h  |   23 
 libxfce4kbd-private/xfce-shortcuts.c|   29 ++
 libxfce4kbd-private/xfwm4-shortcut-values.h |  106 ---
 5 files changed, 180 insertions(+), 129 deletions(-)

diff --git a/libxfce4kbd-private/Makefile.am b/libxfce4kbd-private/Makefile.am
index b9b438f..e5cca7c 100644
--- a/libxfce4kbd-private/Makefile.am
+++ b/libxfce4kbd-private/Makefile.am
@@ -16,7 +16,7 @@ libxfce4kbd_headers = \
xfce-shortcuts-grabber.h \
xfce-shortcut-dialog.h \
xfce-shortcuts.h \
-   xfwm4-shortcut-values.h
+   xfce-shortcuts-xfwm4.h
 
 libxfce4kbd_built_sources = \
xfce-shortcuts-marshal.c \
@@ -28,7 +28,8 @@ libxfce4kbd_sources = \
xfce-shortcuts-provider.c \
xfce-shortcuts-grabber.c \
xfce-shortcut-dialog.c \
-   xfce-shortcuts.c
+   xfce-shortcuts.c \
+   xfce-shortcuts-xfwm4.c
 
 lib_LTLIBRARIES = libxfce4kbd-private-2.la
 
diff --git a/libxfce4kbd-private/xfce-shortcuts-xfwm4.c 
b/libxfce4kbd-private/xfce-shortcuts-xfwm4.c
new file mode 100644
index 000..2626d2b
--- /dev/null
+++ b/libxfce4kbd-private/xfce-shortcuts-xfwm4.c
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2012 Jérôme Guelfucci jero...@xfce.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * 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
+ * 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., Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include config.h
+#endif
+
+#include libxfce4util/libxfce4util.h
+#include libxfce4kbd-private/xfce-shortcuts-xfwm4.h
+
+typedef struct _ShortcutTemplate ShortcutTemplate;
+
+struct _ShortcutTemplate
+{
+  const gchar *name;
+  const gchar *feature;
+};
+
+const ShortcutTemplate xfwm4_shortcut_values[] = {
+  { N_(Window operations menu), popup_menu_key },
+  { N_(Up), up_key },
+  { N_(Down), down_key },
+  { N_(Left), left_key },
+  { N_(Right), right_key },
+  { N_(Cancel), cancel_key },
+  { N_(Cycle windows), cycle_windows_key },
+  { N_(Cycle windows (Reverse)), cycle_reverse_windows_key },
+  { N_(Switch window for same application), switch_window_key },
+  { N_(Switch application), switch_application_key },
+  { N_(Close window), close_window_key },
+  { N_(Maximize window horizontally), maximize_horiz_key },
+  { N_(Maximize window vertically), maximize_vert_key },
+  { N_(Maximize window), maximize_window_key },
+  { N_(Hide window), hide_window_key },
+  { N_(Move window), move_window_key },
+  { N_(Resize window), resize_window_key },
+  { N_(Shade window), shade_window_key },
+  { N_(Stick window), stick_window_key },
+  { N_(Raise window), raise_window_key },
+  { N_(Lower window), lower_window_key },
+  { N_(Raise or lower window), raiselower_window_key },
+  { N_(Fill window), fill_window_key },
+  { N_(Fill window horizontally), fill_horiz_key },
+  { N_(Fill window vertically), fill_vert_key },
+  { N_(Toggle above), above_key },
+  { N_(Toggle fullscreen), fullscreen_key },
+  { N_(Move window to upper workspace), move_window_up_workspace_key },
+  { N_(Move window to bottom workspace), move_window_down_workspace_key },
+  { N_(Move window to left workspace), move_window_left_workspace_key },
+  { N_(Move window to right workspace), move_window_right_workspace_key },
+  { N_(Move window to previous workspace), move_window_prev_workspace_key 
},
+  { N_(Move window to next workspace), move_window_next_workspace_key },
+  { N_(Move window to workspace 1), move_window_workspace_1_key },
+  { N_(Move window to workspace 2), move_window_workspace_2_key },
+  { N_(Move window to workspace 3), move_window_workspace_3_key },
+  { N_(Move window to workspace 4), move_window_workspace_4_key },
+  { N_(Move window to workspace 5), move_window_workspace_5_key 

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

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 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 *settings,
 
 
 

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

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 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 files 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:master Revert Keep the shortcut dialog above other windows.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 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 files changed, 0 insertions(+), 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:master Fix treeview update when handling conflict (bug #8856).

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 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 files 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:master Set parent window for the conflict dialog.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 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 files changed, 2 insertions(+), 1 deletions(-)

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:master Improve the contents of the command dialog.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 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:master Add comments.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 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 files changed, 4 insertions(+), 0 deletions(-)

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:master Center the buttons with an alignment.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 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 files 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 

[Xfce4-commits] xfce4-settings:master Show shortcut label when editing a shortcut.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 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 files changed, 4 insertions(+), 1 deletions(-)

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:master Tweak buttons positions.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 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 files 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
   /object
   

[Xfce4-commits] xfce4-settings:master Remove ignore_property argument in xfce_keyboard_settings_get_shortcut_info.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 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 files 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:master Merge branch 'jeromeg/keyboard-shortcuts'

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 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 (alignment);
+
+  content_box 

[Xfce4-commits] xfwm4:master Move shortcut names to libxfce4kbd-private.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to eceb53b301158fa901c8a56ed43adcd5bd458ecf (commit)
   from ad0fe194157c9220e53255f30af2f9395e86da0d (commit)

commit eceb53b301158fa901c8a56ed43adcd5bd458ecf
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 17:37:11 2012 +0100

Move shortcut names to libxfce4kbd-private.

 settings-dialogs/xfwm4-settings.c |   97 +++--
 1 files changed, 8 insertions(+), 89 deletions(-)

diff --git a/settings-dialogs/xfwm4-settings.c 
b/settings-dialogs/xfwm4-settings.c
index 212e4e7..a2f4690 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -43,6 +43,7 @@
 #include xfconf/xfconf.h
 #include libxfce4kbd-private/xfce-shortcut-dialog.h
 #include libxfce4kbd-private/xfce-shortcuts-provider.h
+#include libxfce4kbd-private/xfwm4-shortcut-values.h
 
 #include xfwm4-dialog_ui.h
 #include xfwm4-settings.h
@@ -66,7 +67,6 @@
 
 
 typedef struct _MenuTemplate MenuTemplate;
-typedef struct _ShortcutTemplate ShortcutTemplate;
 
 
 
@@ -198,13 +198,6 @@ struct _MenuTemplate
   const gchar *value;
 };
 
-struct _ShortcutTemplate
-{
-  const gchar *name;
-  const gchar *feature;
-  const gchar *shortcut;
-};
-
 enum
 {
   COL_THEME_NAME,
@@ -232,81 +225,7 @@ static const MenuTemplate title_align_values[] = {
   { NULL, NULL },
 };
 
-static const ShortcutTemplate shortcut_values[] = {
-  { N_(Window operations menu), popup_menu_key, NULL },
-  { N_(Up), up_key, NULL },
-  { N_(Down), down_key, NULL },
-  { N_(Left), left_key, NULL },
-  { N_(Right), right_key, NULL },
-  { N_(Cancel), cancel_key, NULL },
-  { N_(Cycle windows), cycle_windows_key, NULL },
-  { N_(Cycle windows (Reverse)), cycle_reverse_windows_key, NULL },
-  { N_(Switch window for same application), switch_window_key, NULL },
-  { N_(Switch application), switch_application_key, NULL },
-  { N_(Close window), close_window_key, NULL },
-  { N_(Maximize window horizontally), maximize_horiz_key, NULL },
-  { N_(Maximize window vertically), maximize_vert_key, NULL },
-  { N_(Maximize window), maximize_window_key, NULL },
-  { N_(Hide window), hide_window_key, NULL },
-  { N_(Move window), move_window_key, NULL },
-  { N_(Resize window), resize_window_key, NULL },
-  { N_(Shade window), shade_window_key, NULL },
-  { N_(Stick window), stick_window_key, NULL },
-  { N_(Raise window), raise_window_key, NULL },
-  { N_(Lower window), lower_window_key, NULL },
-  { N_(Raise or lower window), raiselower_window_key, NULL },
-  { N_(Fill window), fill_window_key, NULL },
-  { N_(Fill window horizontally), fill_horiz_key, NULL },
-  { N_(Fill window vertically), fill_vert_key, NULL },
-  { N_(Toggle above), above_key, NULL },
-  { N_(Toggle fullscreen), fullscreen_key, NULL },
-  { N_(Move window to upper workspace), move_window_up_workspace_key, NULL 
},
-  { N_(Move window to bottom workspace), move_window_down_workspace_key, 
NULL },
-  { N_(Move window to left workspace), move_window_left_workspace_key, 
NULL },
-  { N_(Move window to right workspace), move_window_right_workspace_key, 
NULL },
-  { N_(Move window to previous workspace), move_window_prev_workspace_key, 
NULL },
-  { N_(Move window to next workspace), move_window_next_workspace_key, 
NULL },
-  { N_(Move window to workspace 1), move_window_workspace_1_key, NULL, },
-  { N_(Move window to workspace 2), move_window_workspace_2_key, NULL, },
-  { N_(Move window to workspace 3), move_window_workspace_3_key, NULL, },
-  { N_(Move window to workspace 4), move_window_workspace_4_key, NULL, },
-  { N_(Move window to workspace 5), move_window_workspace_5_key, NULL, },
-  { N_(Move window to workspace 6), move_window_workspace_6_key, NULL, },
-  { N_(Move window to workspace 7), move_window_workspace_7_key, NULL, },
-  { N_(Move window to workspace 8), move_window_workspace_8_key, NULL, },
-  { N_(Move window to workspace 9), move_window_workspace_9_key, NULL, },
-  { N_(Move window to workspace 10), move_window_workspace_10_key, NULL, },
-  { N_(Move window to workspace 11), move_window_workspace_11_key, NULL, },
-  { N_(Move window to workspace 12), move_window_workspace_12_key, NULL, },
-  { N_(Tile window to the top), tile_up_key, NULL, },
-  { N_(Tile window to the bottom), tile_down_key, NULL, },
-  { N_(Tile window to the left), tile_left_key, NULL, },
-  { N_(Tile window to the right), tile_right_key, NULL, },
-  { N_(Show desktop), show_desktop_key, NULL },
-  { N_(Upper workspace), up_workspace_key, NULL },
-  { N_(Bottom workspace), down_workspace_key, NULL },
-  { N_(Left workspace), left_workspace_key, NULL },
-  { N_(Right workspace), right_workspace_key, NULL },
-  { N_(Previous workspace), prev_workspace_key, NULL },
-  { N_(Next workspace), next_workspace_key, NULL },
-  { N_(Workspace 1), workspace_1_key, NULL, },
-  { N_(Workspace 2), workspace_2_key, NULL, },
-  { N_(Workspace 3), workspace_3_key, NULL, },
-  { N_(Workspace 4), workspace_4_key, NULL, },
-  { 

[Xfce4-commits] xfwm4:master Show the label instead of the accelerator string.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to e7703727fbd5d91d6fd9de0a1a64bfef86eea296 (commit)
   from eceb53b301158fa901c8a56ed43adcd5bd458ecf (commit)

commit e7703727fbd5d91d6fd9de0a1a64bfef86eea296
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 17:51:51 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.

 settings-dialogs/xfwm4-settings.c |   29 -
 1 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/settings-dialogs/xfwm4-settings.c 
b/settings-dialogs/xfwm4-settings.c
index a2f4690..281a022 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -50,13 +50,14 @@
 
 
 
-#define DEFAULT_THEME Default
+#define DEFAULT_THEME   Default
 
-#define INDICATOR_SIZE9
+#define INDICATOR_SIZE  9
 
-#define SHORTCUTS_NAME_COLUMN 0
-#define SHORTCUTS_FEATURE_COLUMN  1
-#define SHORTCUTS_SHORTCUT_COLUMN 2
+#define SHORTCUTS_NAME_COLUMN   0
+#define SHORTCUTS_FEATURE_COLUMN1
+#define SHORTCUTS_SHORTCUT_COLUMN   2
+#define SHORTCUTS_SHORTCUT_LABEL_COLUMN 3
 
 
 
@@ -66,7 +67,7 @@
 
 
 
-typedef struct _MenuTemplate MenuTemplate;
+typedef struct _MenuTemplateMenuTemplate;
 
 
 
@@ -512,7 +513,7 @@ xfwm_settings_constructed (GObject *object)
 gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW 
(shortcuts_treeview)),
  GTK_SELECTION_MULTIPLE);
 
-list_store = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_STRING, 
G_TYPE_STRING);
+list_store = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_STRING, 
G_TYPE_STRING, G_TYPE_STRING);
 gtk_tree_view_set_model (GTK_TREE_VIEW (shortcuts_treeview), 
GTK_TREE_MODEL (list_store));
 g_object_unref (G_OBJECT (list_store));
 
@@ -524,7 +525,7 @@ xfwm_settings_constructed (GObject *object)
 renderer = gtk_cell_renderer_text_new ();
 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW 
(shortcuts_treeview),
  1, _(Shortcut), renderer,
- text, 
SHORTCUTS_SHORTCUT_COLUMN, NULL);
+ text, 
SHORTCUTS_SHORTCUT_LABEL_COLUMN, NULL);
 
 g_signal_connect (shortcuts_treeview, row-activated,
   G_CALLBACK (xfwm_settings_shortcut_row_activated), 
settings);
@@ -1679,8 +1680,18 @@ xfwm_settings_reload_shortcut (XfceShortcut *shortcut,
 
   if (G_UNLIKELY (g_str_equal (feature, shortcut-command)))
 {
+  GdkModifierType  modifiers;
+  guintkeyval;
+  gchar   *label;
+
+  /* Get the shortcut label */
+  gtk_accelerator_parse (shortcut-shortcut, keyval, modifiers);
+  label = gtk_accelerator_get_label (keyval, modifiers);
+
   gtk_list_store_set (GTK_LIST_STORE (model), iter,
-  SHORTCUTS_SHORTCUT_COLUMN, 
shortcut-shortcut, -1);
+  SHORTCUTS_SHORTCUT_COLUMN, 
shortcut-shortcut,
+  SHORTCUTS_SHORTCUT_LABEL_COLUMN, label, -1);
+  g_free (label);
 }
 
   g_free (feature);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfwm4:master Update treeview when clearing a shortcut.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 556ffdb3fd2e6e414de8cb347f2c9d8251aebf9d (commit)
   from e7703727fbd5d91d6fd9de0a1a64bfef86eea296 (commit)

commit 556ffdb3fd2e6e414de8cb347f2c9d8251aebf9d
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Wed Dec 19 22:59:04 2012 +0100

Update treeview when clearing a shortcut.

 settings-dialogs/xfwm4-settings.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/settings-dialogs/xfwm4-settings.c 
b/settings-dialogs/xfwm4-settings.c
index 281a022..6746d27 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -1731,6 +1731,9 @@ xfwm_settings_shortcut_added (XfceShortcutsProvider 
*provider,
   XfwmSettings  *settings)
 {
   g_return_if_fail (XFWM_IS_SETTINGS (settings));
+
+  DBG (Shortcut added signal: %s, shortcut);
+
   xfwm_settings_reload_shortcuts (settings);
 }
 
@@ -1742,6 +1745,9 @@ xfwm_settings_shortcut_removed (XfceShortcutsProvider 
*provider,
 XfwmSettings  *settings)
 {
   g_return_if_fail (XFWM_IS_SETTINGS (settings));
+
+  DBG (Shortcut removed signal: %s, shortcut);
+
   xfwm_settings_reload_shortcuts (settings);
 }
 
@@ -1792,6 +1798,10 @@ xfwm_settings_shortcut_clear_clicked (GtkButton
*button,
   /* Remove keyboard shortcut via xfconf */
   xfce_shortcuts_provider_reset_shortcut 
(settings-priv-provider, shortcut);
 
+  gtk_list_store_set (GTK_LIST_STORE (model), tree_iter,
+  SHORTCUTS_SHORTCUT_COLUMN, NULL,
+  SHORTCUTS_SHORTCUT_LABEL_COLUMN, NULL, -1);
+
   /* Free shortcut string */
   g_free (shortcut);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfwm4:master Pass parent to conflict dialog.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 7d933f37584a08775607d9c93e713de02f48a45b (commit)
   from 556ffdb3fd2e6e414de8cb347f2c9d8251aebf9d (commit)

commit 7d933f37584a08775607d9c93e713de02f48a45b
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 11:05:58 2012 +0100

Pass parent to conflict dialog.

 settings-dialogs/xfwm4-settings.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/settings-dialogs/xfwm4-settings.c 
b/settings-dialogs/xfwm4-settings.c
index 6746d27..64dea66 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -1909,7 +1909,8 @@ xfwm_settings_validate_shortcut (XfceShortcutDialog  
*dialog,
 {
   if (G_LIKELY (!g_str_equal (xfce_shortcut_dialog_get_action (dialog), 
other_shortcut-command)))
 {
-  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 (other_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] xfwm4:master Fix crash when handling conflict involving xfwm4 actions.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 17d3d97874eb9c764669f5499ad5b4468506ade4 (commit)
   from 7d933f37584a08775607d9c93e713de02f48a45b (commit)

commit 17d3d97874eb9c764669f5499ad5b4468506ade4
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Thu Dec 20 23:22:08 2012 +0100

Fix crash when handling conflict involving xfwm4 actions.

xfce_shortcut_dialog_get_action_name seems to return garbage which made
the application segfault.

 settings-dialogs/xfwm4-settings.c |   22 ++
 1 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/settings-dialogs/xfwm4-settings.c 
b/settings-dialogs/xfwm4-settings.c
index 64dea66..1b5b7e9 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -1844,24 +1844,6 @@ xfwm_settings_shortcut_reset_clicked (GtkButton
*button,
 
 
 
-static const gchar *
-xfwm_settings_shortcut_feature_name (const gchar *feature)
-{
-  const gchar *result = feature;
-  gint i;
-
-  for (i = 0; xfwm4_shortcut_values[i].name != NULL; ++i)
-if (G_UNLIKELY (g_str_equal (xfwm4_shortcut_values[i].feature, feature)))
-  {
-result = xfwm4_shortcut_values[i].name;
-break;
-  }
-
-  return result;
-}
-
-
-
 static gboolean
 xfwm_settings_validate_shortcut (XfceShortcutDialog  *dialog,
  const gchar *shortcut,
@@ -1913,8 +1895,8 @@ xfwm_settings_validate_shortcut (XfceShortcutDialog  
*dialog,
 
xfce_shortcuts_provider_get_name (settings-priv-provider),
 
xfce_shortcuts_provider_get_name (other_provider),
 shortcut,
-
xfce_shortcut_dialog_get_action_name (dialog),
-
xfwm_settings_shortcut_feature_name (other_shortcut-command),
+
xfce_shortcut_dialog_get_action (dialog),
+other_shortcut-command,
 FALSE);
 
   if (G_UNLIKELY (response == GTK_RESPONSE_ACCEPT))
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfwm4:master Add an Edit button and improve the buttons' layout.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to f609df3f73f1e7a4c7659b2b20ed3e043aa9f2e7 (commit)
   from 17d3d97874eb9c764669f5499ad5b4468506ade4 (commit)

commit f609df3f73f1e7a4c7659b2b20ed3e043aa9f2e7
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sat Dec 29 14:42:55 2012 +0100

Add an Edit button and improve the buttons' layout.

 settings-dialogs/xfwm4-dialog.glade |   85 ++-
 settings-dialogs/xfwm4-settings.c   |   58 
 2 files changed, 112 insertions(+), 31 deletions(-)

diff --git a/settings-dialogs/xfwm4-dialog.glade 
b/settings-dialogs/xfwm4-dialog.glade
index 97b1189..d623b7b 100644
--- a/settings-dialogs/xfwm4-dialog.glade
+++ b/settings-dialogs/xfwm4-dialog.glade
@@ -544,46 +544,69 @@
   /packing
 /child
 child
-  object class=GtkHButtonBox id=hbuttonbox1
+  object class=GtkAlignment id=alignment15
 property name=visibleTrue/property
 property name=can_focusFalse/property
-property name=spacing12/property
-property name=layout_stylecenter/property
+property name=yalign0/property
+property name=xscale0/property
 child
-  object class=GtkButton 
id=shortcuts_clear_button
-property name=labelgtk-clear/property
-property 
name=use_action_appearanceFalse/property
+  object class=GtkHBox id=hbox5
 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=shortcuts_reset_button
-property name=label 
translatable=yes_Reset 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_underlineTrue/property
+property name=can_focusFalse/property
+property name=spacing6/property
+child
+  object class=GtkButton 
id=shortcuts_edit_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=expandFalse/property
+property name=fillFalse/property
+property name=position0/property
+  /packing
+/child
+child
+  object class=GtkButton 
id=shortcuts_clear_button
+property name=labelgtk-clear/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=position1/property
+  /packing
+ 

[Xfce4-commits] xfwm4:master Fix compiler warning.

2012-12-30 Thread Nick Schermer
Updating branch refs/heads/master
 to d2f828e9ee673bd5857852b77666e8949b7d9ac0 (commit)
   from f609df3f73f1e7a4c7659b2b20ed3e043aa9f2e7 (commit)

commit d2f828e9ee673bd5857852b77666e8949b7d9ac0
Author: Nick Schermer n...@xfce.org
Date:   Sun Dec 30 11:16:38 2012 +0100

Fix compiler warning.

 settings-dialogs/xfwm4-settings.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/settings-dialogs/xfwm4-settings.c 
b/settings-dialogs/xfwm4-settings.c
index 88cc9d5..e621141 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -1767,12 +1767,10 @@ xfwm_settings_shortcut_edit_clicked (GtkButton
*button,
   GtkTreeSelection *selection;
   GtkTreeModel *model;
   GtkTreePath  *path;
-  GtkTreeIter   tree_iter;
   GtkWidget*view;
   GList*rows;
   GList*iter;
   GList*row_references = NULL;
-  gchar*shortcut;
 
   g_return_if_fail (XFWM_IS_SETTINGS (settings));
   g_return_if_fail (GTK_IS_BUILDER (settings-priv-builder));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfwm4:master Use new libxfce4kb-private functions for feature names.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 1498e23fdbecad0d35c9cf53d7b29f55ec098213 (commit)
   from d2f828e9ee673bd5857852b77666e8949b7d9ac0 (commit)

commit 1498e23fdbecad0d35c9cf53d7b29f55ec098213
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 30 14:36:35 2012 +0100

Use new libxfce4kb-private functions for feature names.

The strings are now translated.

 settings-dialogs/xfwm4-settings.c |   24 
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/settings-dialogs/xfwm4-settings.c 
b/settings-dialogs/xfwm4-settings.c
index e621141..15a83e7 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -43,7 +43,7 @@
 #include xfconf/xfconf.h
 #include libxfce4kbd-private/xfce-shortcut-dialog.h
 #include libxfce4kbd-private/xfce-shortcuts-provider.h
-#include libxfce4kbd-private/xfwm4-shortcut-values.h
+#include libxfce4kbd-private/xfce-shortcuts-xfwm4.h
 
 #include xfwm4-dialog_ui.h
 #include xfwm4-settings.h
@@ -1621,7 +1621,7 @@ xfwm_settings_initialize_shortcuts (XfwmSettings 
*settings)
   GtkTreeModel *model;
   GtkTreeIter   iter;
   GtkWidget*view;
-  gint  i;
+  GList*feature_list;
 
   g_return_if_fail (XFWM_IS_SETTINGS (settings));
   g_return_if_fail (GTK_IS_BUILDER (settings-priv-builder));
@@ -1631,13 +1631,21 @@ xfwm_settings_initialize_shortcuts (XfwmSettings 
*settings)
 
   gtk_list_store_clear (GTK_LIST_STORE (model));
 
-  for (i = 0; xfwm4_shortcut_values[i].name != NULL; ++i)
+  if (feature_list = xfce_shortcuts_xfwm4_get_feature_list ())
 {
-  gtk_list_store_append (GTK_LIST_STORE (model), iter);
-  gtk_list_store_set (GTK_LIST_STORE (model), iter,
-  SHORTCUTS_NAME_COLUMN, 
_(xfwm4_shortcut_values[i].name),
-  SHORTCUTS_FEATURE_COLUMN, 
xfwm4_shortcut_values[i].feature,
-  -1);
+  GList *l;
+
+  for (l = g_list_first (feature_list); l != NULL; l = g_list_next (l))
+{
+  gtk_list_store_append (GTK_LIST_STORE (model), iter);
+  gtk_list_store_set (GTK_LIST_STORE (model), iter,
+  SHORTCUTS_NAME_COLUMN,
+  xfce_shortcuts_xfwm4_get_feature_name (l-data),
+  SHORTCUTS_FEATURE_COLUMN, l-data,
+  -1);
+}
+
+  g_list_free (feature_list);
 }
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfwm4:master Update treeview when choosing to use new value in a conflict.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 5b473cf697eab460c157619d5c1c0c12cd2313b0 (commit)
   from 1498e23fdbecad0d35c9cf53d7b29f55ec098213 (commit)

commit 5b473cf697eab460c157619d5c1c0c12cd2313b0
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 30 15:01:58 2012 +0100

Update treeview when choosing to use new value in a conflict.

We need to erase the old shortcut manually in the treeview as we won't
get a signal for features which are not used anymore.

 settings-dialogs/xfwm4-settings.c |   45 -
 1 files changed, 44 insertions(+), 1 deletions(-)

diff --git a/settings-dialogs/xfwm4-settings.c 
b/settings-dialogs/xfwm4-settings.c
index 15a83e7..4f284d3 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -175,6 +175,10 @@ static void   xfwm_settings_shortcut_added 
  (XfceShortc
 static void   xfwm_settings_shortcut_removed 
(XfceShortcutsProvider *provider,
   const 
gchar   *shortcut,
   
XfwmSettings  *settings);
+static gboolean   xfwm_settings_update_treeview_on_conflict_replace  
(GtkTreeModel  *model,
+  
GtkTreePath   *path,
+  
GtkTreeIter   *iter,
+  gpointer 
  shortcut_to_erase);
 static void   xfwm_settings_shortcut_edit_clicked
(GtkButton *button,
   
XfwmSettings  *settings);
 static void   xfwm_settings_shortcut_clear_clicked   
(GtkButton *button,
@@ -1909,6 +1913,35 @@ xfwm_settings_shortcut_reset_clicked (GtkButton
*button,
 
 
 static gboolean
+xfwm_settings_update_treeview_on_conflict_replace (GtkTreeModel *model,
+   GtkTreePath  *path,
+   GtkTreeIter  *iter,
+   gpointer  
shortcut_to_erase)
+{
+  gchar *shortcut;
+
+  gtk_tree_model_get (model, iter, SHORTCUTS_SHORTCUT_COLUMN, shortcut, -1);
+
+  if (g_strcmp0 (shortcut_to_erase, shortcut) == 0)
+{
+  /* We found the iter for which we want to erase the shortcut value */
+  /* Let's do it! */
+  gtk_list_store_set (GTK_LIST_STORE (model), iter,
+  SHORTCUTS_SHORTCUT_COLUMN, NULL,
+  SHORTCUTS_SHORTCUT_LABEL_COLUMN, NULL, -1);
+
+  g_free (shortcut);
+
+  return TRUE;
+}
+
+  g_free (shortcut);
+
+  return FALSE;
+}
+
+
+static gboolean
 xfwm_settings_validate_shortcut (XfceShortcutDialog  *dialog,
  const gchar *shortcut,
  XfwmSettings*settings)
@@ -1964,7 +1997,17 @@ xfwm_settings_validate_shortcut (XfceShortcutDialog  
*dialog,
 FALSE);
 
   if (G_UNLIKELY (response == GTK_RESPONSE_ACCEPT))
-xfce_shortcuts_provider_reset_shortcut (other_provider, shortcut);
+{
+  GObject *view;
+
+  xfce_shortcuts_provider_reset_shortcut (other_provider, 
shortcut);
+
+  /* We need to update the treeview to erase the shortcut value */
+  view = gtk_builder_get_object (settings-priv-builder, 
shortcuts_treeview);
+  gtk_tree_model_foreach (gtk_tree_view_get_model (GTK_TREE_VIEW 
(view)),
+  
xfwm_settings_update_treeview_on_conflict_replace,
+  (gpointer) shortcut);
+}
   else
 accepted = FALSE;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfwm4:master Improve main shortcuts view as per Nick's suggestions.

2012-12-30 Thread Jérôme Guelfucci
Updating branch refs/heads/master
 to 6b8259ee4c95c9d9fb7c642821df5926c3de514e (commit)
   from 5b473cf697eab460c157619d5c1c0c12cd2313b0 (commit)

commit 6b8259ee4c95c9d9fb7c642821df5926c3de514e
Author: Jérôme Guelfucci jero...@xfce.org
Date:   Sun Dec 30 15:21:24 2012 +0100

 Improve main shortcuts view as per Nick's suggestions.

 Don't use a GtkFrame and put everything in a GtkAlignment instead. This
 is consistent with xfce4-keyboard-settings.

 settings-dialogs/xfwm4-dialog.glade |  163 +++
 1 files changed, 88 insertions(+), 75 deletions(-)

diff --git a/settings-dialogs/xfwm4-dialog.glade 
b/settings-dialogs/xfwm4-dialog.glade
index d623b7b..09c457c 100644
--- a/settings-dialogs/xfwm4-dialog.glade
+++ b/settings-dialogs/xfwm4-dialog.glade
@@ -506,20 +506,34 @@
   /packing
 /child
 child
-  object class=GtkFrame id=frame9
+  object class=GtkAlignment id=alignment12
 property name=visibleTrue/property
 property name=can_focusFalse/property
-property name=border_width12/property
-property name=label_xalign0/property
-property name=shadow_typenone/property
+property name=top_padding6/property
+property name=bottom_padding6/property
+property name=left_padding12/property
 child
-  object class=GtkAlignment id=alignment12
+  object class=GtkVBox id=vbox10
 property name=visibleTrue/property
 property name=can_focusFalse/property
-property name=border_width6/property
-property name=left_padding12/property
+property name=spacing6/property
+child
+  object class=GtkLabel id=label22
+property name=visibleTrue/property
+property name=can_focusFalse/property
+property name=xalign0/property
+property name=label translatable=yesDefine 
shortcuts to perform _window manager actions:/property
+property name=use_markupTrue/property
+property name=use_underlineTrue/property
+  /object
+  packing
+property name=expandFalse/property
+property name=fillFalse/property
+property name=position0/property
+  /packing
+/child
 child
-  object class=GtkVBox id=vbox10
+  object class=GtkVBox id=vbox11
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=spacing6/property
@@ -544,85 +558,84 @@
   /packing
 /child
 child
-  object class=GtkAlignment id=alignment15
+  placeholder/
+/child
+  /object
+  packing
+property name=expandTrue/property
+property name=fillTrue/property
+property name=position1/property
+  /packing
+/child
+child
+  object class=GtkAlignment id=alignment15
+property name=visibleTrue/property
+property name=can_focusFalse/property
+property name=yalign0/property
+property name=xscale0/property
+child
+  object class=GtkHBox id=hbox5
 property name=visibleTrue/property
 property name=can_focusFalse/property
-property name=yalign0/property
-property name=xscale0/property
+property name=spacing6/property
 child
-  object class=GtkHBox id=hbox5
+  object class=GtkButton 
id=shortcuts_edit_button
+property name=labelgtk-edit/property
+property 
name=use_action_appearanceFalse/property
 property name=visibleTrue/property
-property name=can_focusFalse/property
-property name=spacing6/property
-child
-  object class=GtkButton 
id=shortcuts_edit_button
-property 

  1   2   >