[Xfce4-commits] Remove custom OSD brightness popup, use libnotify instead

2013-02-02 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/use-libnotify
 to fcb0b1bef436fe4cb3831e3597ae98d016d5cc88 (commit)
   from b05bea0a3b990109c6ddb6afa7c1d3b9b4473e4e (commit)

commit fcb0b1bef436fe4cb3831e3597ae98d016d5cc88
Author: Jannis Pohlmann 
Date:   Sun Feb 3 00:30:48 2013 +0100

Remove custom OSD brightness popup, use libnotify instead

The custom rendered OSD popup to indicate the current brightness
state whenever it changed looked nice but it is better handled in
the notification daemon. E.g. we could include an extension hint
in the notification to have xfce4-notifyd render certain
notifications (e.g. brightness, volume changes) in a different style
than regular notifications.

This commit simplifies the whole brightness notification logic
quite a bit.

Signed-off-by: Jannis Pohlmann 

 src/Makefile.am |4 +-
 src/gsd-media-keys-window.c | 1078 ---
 src/gsd-media-keys-window.h |   71 ---
 src/xfpm-backlight.c|  128 +-
 src/xfpm-notify.c   |2 +-
 5 files changed, 19 insertions(+), 1264 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index eaca181..0435bed 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,9 +37,7 @@ xfce4_power_manager_SOURCES =   \
xfpm-polkit.c   \
xfpm-polkit.h   \
xfpm-errors.c   \
-   xfpm-errors.h   \
-   gsd-media-keys-window.c \
-   gsd-media-keys-window.h
+   xfpm-errors.h
 
 xfce4_power_manager_CFLAGS =\
-I$(top_srcdir) \
diff --git a/src/gsd-media-keys-window.c b/src/gsd-media-keys-window.c
deleted file mode 100644
index b2664e2..000
--- a/src/gsd-media-keys-window.c
+++ /dev/null
@@ -1,1078 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2006-2007 William Jon McCann 
- *
- * 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.
- *
- */
-
-#include "config.h"
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "gsd-media-keys-window.h"
-
-#include "data/interfaces/acme_ui.h"
-
-#define DIALOG_TIMEOUT 2000 /* dialog timeout in ms */
-#define DIALOG_FADE_TIMEOUT 1500 /* timeout before fade starts */
-#define FADE_TIMEOUT 10/* timeout in ms between each frame of the fade 
*/
-
-#define BG_ALPHA 0.75
-#define FG_ALPHA 1.00
-
-#define GSD_MEDIA_KEYS_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE 
((o), GSD_TYPE_MEDIA_KEYS_WINDOW, GsdMediaKeysWindowPrivate))
-
-struct GsdMediaKeysWindowPrivate
-{
-guintis_composited : 1;
-guinthide_timeout_id;
-guintfade_timeout_id;
-double   fade_out_alpha;
-GsdMediaKeysWindowAction action;
-char*icon_name;
-gboolean show_level;
-
-guintvolume_muted : 1;
-int  volume_level;
-
-GtkImage*image;
-GtkWidget   *progress;
-};
-
-G_DEFINE_TYPE (GsdMediaKeysWindow, gsd_media_keys_window, GTK_TYPE_WINDOW)
-
-static gboolean
-fade_timeout (GsdMediaKeysWindow *window)
-{
-if (window->priv->fade_out_alpha <= 0.0) {
-gtk_widget_hide (GTK_WIDGET (window));
-
-/* Reset it for the next time */
-window->priv->fade_out_alpha = 1.0;
-window->priv->fade_timeout_id = 0;
-
-return FALSE;
-} else {
-GdkRectangle rect;
-GtkWidget *win = GTK_WIDGET (window);
-GtkAllocation allocation;
-
-window->priv->fade_out_alpha -= 0.10;
-
-rect.x = 0;
-rect.y = 0;
-gtk_widget_get_allocation (win, &allocation);
-rect.width = allocation.width;
-rect.height = allocation.height;
-
-gtk_widget_realize (win);
-gdk_window_invalidate_rect (gtk_widget_get_window (win), 
&

[Xfce4-commits] Creating branch jannis/use-libnotify

2013-02-02 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/use-libnotify
 as new branch
 to fcb0b1bef436fe4cb3831e3597ae98d016d5cc88 (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/jannis/use-libnotify

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Remove custom OSD brightness popup, use libnotify instead

2013-02-02 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/use-libnotify
 to 2e3026ef4dea8bda018891d82990a337129e44f1 (commit)
   from b05bea0a3b990109c6ddb6afa7c1d3b9b4473e4e (commit)

commit 2e3026ef4dea8bda018891d82990a337129e44f1
Author: Jannis Pohlmann 
Date:   Sun Feb 3 00:30:48 2013 +0100

Remove custom OSD brightness popup, use libnotify instead

The custom rendered OSD popup to indicate the current brightness
state whenever it changed looked nice but it is better handled in
the notification daemon. E.g. we could include an extension hint
in the notification to have xfce4-notifyd render certain
notifications (e.g. brightness, volume changes) in a different style
than regular notifications.

This commit simplifies the whole brightness notification logic
quite a bit.

 src/Makefile.am |4 +-
 src/gsd-media-keys-window.c | 1078 ---
 src/gsd-media-keys-window.h |   71 ---
 src/xfpm-backlight.c|  128 +-
 src/xfpm-notify.c   |2 +-
 5 files changed, 19 insertions(+), 1264 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index eaca181..0435bed 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,9 +37,7 @@ xfce4_power_manager_SOURCES =   \
xfpm-polkit.c   \
xfpm-polkit.h   \
xfpm-errors.c   \
-   xfpm-errors.h   \
-   gsd-media-keys-window.c \
-   gsd-media-keys-window.h
+   xfpm-errors.h
 
 xfce4_power_manager_CFLAGS =\
-I$(top_srcdir) \
diff --git a/src/gsd-media-keys-window.c b/src/gsd-media-keys-window.c
deleted file mode 100644
index b2664e2..000
--- a/src/gsd-media-keys-window.c
+++ /dev/null
@@ -1,1078 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2006-2007 William Jon McCann 
- *
- * 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.
- *
- */
-
-#include "config.h"
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "gsd-media-keys-window.h"
-
-#include "data/interfaces/acme_ui.h"
-
-#define DIALOG_TIMEOUT 2000 /* dialog timeout in ms */
-#define DIALOG_FADE_TIMEOUT 1500 /* timeout before fade starts */
-#define FADE_TIMEOUT 10/* timeout in ms between each frame of the fade 
*/
-
-#define BG_ALPHA 0.75
-#define FG_ALPHA 1.00
-
-#define GSD_MEDIA_KEYS_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE 
((o), GSD_TYPE_MEDIA_KEYS_WINDOW, GsdMediaKeysWindowPrivate))
-
-struct GsdMediaKeysWindowPrivate
-{
-guintis_composited : 1;
-guinthide_timeout_id;
-guintfade_timeout_id;
-double   fade_out_alpha;
-GsdMediaKeysWindowAction action;
-char*icon_name;
-gboolean show_level;
-
-guintvolume_muted : 1;
-int  volume_level;
-
-GtkImage*image;
-GtkWidget   *progress;
-};
-
-G_DEFINE_TYPE (GsdMediaKeysWindow, gsd_media_keys_window, GTK_TYPE_WINDOW)
-
-static gboolean
-fade_timeout (GsdMediaKeysWindow *window)
-{
-if (window->priv->fade_out_alpha <= 0.0) {
-gtk_widget_hide (GTK_WIDGET (window));
-
-/* Reset it for the next time */
-window->priv->fade_out_alpha = 1.0;
-window->priv->fade_timeout_id = 0;
-
-return FALSE;
-} else {
-GdkRectangle rect;
-GtkWidget *win = GTK_WIDGET (window);
-GtkAllocation allocation;
-
-window->priv->fade_out_alpha -= 0.10;
-
-rect.x = 0;
-rect.y = 0;
-gtk_widget_get_allocation (win, &allocation);
-rect.width = allocation.width;
-rect.height = allocation.height;
-
-gtk_widget_realize (win);
-gdk_window_invalidate_rect (gtk_widget_get_window (win), 
&rect, FALSE);
-}
-
-ret

[Xfce4-commits] Creating branch jannis/use-libnotify

2013-02-02 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/use-libnotify
 as new branch
 to 2e3026ef4dea8bda018891d82990a337129e44f1 (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/jannis/use-libnotify

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Move away from using a hard-coded size for window icons (bug #8626).

2012-04-15 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 16ab778bb7fd307f7ac35715a33283494373bce6 (commit)
   from 096f3b6eb37205b6cabb0da4ecc8886b24a67a28 (commit)

commit 16ab778bb7fd307f7ac35715a33283494373bce6
Author: Jannis Pohlmann 
Date:   Sun Apr 15 22:42:21 2012 +0100

Move away from using a hard-coded size for window icons (bug #8626).

The previous commit wasn't actually related to this bug. The problem
here was that the xfwm4 tab window now allows themes to change the size
of the displayed window icons but Thunar still hard-coded its own window
icons to 48px.

From this commit Thunar on uses thunar_file_get_icon_name(current_dir)
to get an icon name for the current directory and and then calls
gtk_window_set_icon_name() rather than asking ThunarIconFactory for a
48px GdkPixbuf that cannot be scaled up nicely. This is ok because we
only ever set icons for directories and for those ThunarIconFactory
never returns anything but a GdkPixbuf based on an icon name anyway. It
never returns a GdkPixbuf loaded from an absolute path or anything.

 NEWS   |3 ++-
 thunar/thunar-window.c |   19 ++-
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/NEWS b/NEWS
index 672ae4b..8702c5c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 1.3.x
 =
-- Add a 64x64 and 128x128 icon for Thunar (bug #8626).
+- Add a 64x64 and 128x128 icon for Thunar.
+- Move away from the hard-coded size of window icons (bug #8626).
 
 1.3.2
 =
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index 8d930a9..7e19e57 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -2399,9 +2399,10 @@ static void
 thunar_window_current_directory_changed (ThunarFile   *current_directory,
  ThunarWindow *window)
 {
-  GtkAction *action;
-  GdkPixbuf *icon;
-  gchar *title;
+  GtkIconTheme *icon_theme;
+  GtkAction*action;
+  gchar*icon_name;
+  gchar*title;
 
   _thunar_return_if_fail (THUNAR_IS_WINDOW (window));
   _thunar_return_if_fail (THUNAR_IS_FILE (current_directory));
@@ -2418,12 +2419,12 @@ thunar_window_current_directory_changed (ThunarFile   
*current_directory,
   g_free (title);
 
   /* set window icon */
-  icon = thunar_icon_factory_load_file_icon (window->icon_factory, 
current_directory, THUNAR_FILE_ICON_STATE_DEFAULT, 48);
-  if (G_LIKELY (icon != NULL))
-{
-  gtk_window_set_icon (GTK_WINDOW (window), icon);
-  g_object_unref (G_OBJECT (icon));
-}
+  icon_theme = gtk_icon_theme_get_default ();
+  icon_name = thunar_file_get_icon_name (current_directory,
+ THUNAR_FILE_ICON_STATE_DEFAULT,
+ icon_theme);
+  gtk_window_set_icon_name (GTK_WINDOW (window), icon_name);
+  g_free (icon_name);
 }
 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Add an 64x64 and 128x128 icon for Thunar (bug #8626).

2012-04-15 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 096f3b6eb37205b6cabb0da4ecc8886b24a67a28 (commit)
   from 9a304dd4170fa9c996d9e9e91cca18152ac751c4 (commit)

commit 096f3b6eb37205b6cabb0da4ecc8886b24a67a28
Author: Jannis Pohlmann 
Date:   Sun Apr 15 17:07:15 2012 +0100

Add an 64x64 and 128x128 icon for Thunar (bug #8626).

 NEWS |4 
 configure.in.in  |2 ++
 icons/{48x48 => 128x128}/Makefile.am |2 +-
 icons/128x128/Thunar.png |  Bin 0 -> 17430 bytes
 icons/{48x48 => 64x64}/Makefile.am   |2 +-
 icons/64x64/Thunar.png   |  Bin 0 -> 6705 bytes
 icons/Makefile.am|2 ++
 7 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index e09ee1d..672ae4b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+1.3.x
+=
+- Add a 64x64 and 128x128 icon for Thunar (bug #8626).
+
 1.3.2
 =
 - Support small property for trash panel applet (bug #8391).
diff --git a/configure.in.in b/configure.in.in
index 6547d7c..e2b4795 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -262,6 +262,8 @@ icons/Makefile
 icons/16x16/Makefile
 icons/24x24/Makefile
 icons/48x48/Makefile
+icons/64x64/Makefile
+icons/128x128/Makefile
 icons/scalable/Makefile
 pixmaps/Makefile
 plugins/Makefile
diff --git a/icons/48x48/Makefile.am b/icons/128x128/Makefile.am
similarity index 73%
copy from icons/48x48/Makefile.am
copy to icons/128x128/Makefile.am
index 0445160..d458763 100644
--- a/icons/48x48/Makefile.am
+++ b/icons/128x128/Makefile.am
@@ -1,6 +1,6 @@
 # $Id$
 
-iconsdir = $(datadir)/icons/hicolor/48x48/apps
+iconsdir = $(datadir)/icons/hicolor/128x128/apps
 icons_DATA =   \
Thunar.png
 
diff --git a/icons/128x128/Thunar.png b/icons/128x128/Thunar.png
new file mode 100644
index 000..38a2d23
Binary files /dev/null and b/icons/128x128/Thunar.png differ
diff --git a/icons/48x48/Makefile.am b/icons/64x64/Makefile.am
similarity index 74%
copy from icons/48x48/Makefile.am
copy to icons/64x64/Makefile.am
index 0445160..9c86099 100644
--- a/icons/48x48/Makefile.am
+++ b/icons/64x64/Makefile.am
@@ -1,6 +1,6 @@
 # $Id$
 
-iconsdir = $(datadir)/icons/hicolor/48x48/apps
+iconsdir = $(datadir)/icons/hicolor/64x64/apps
 icons_DATA =   \
Thunar.png
 
diff --git a/icons/64x64/Thunar.png b/icons/64x64/Thunar.png
new file mode 100644
index 000..6939dce
Binary files /dev/null and b/icons/64x64/Thunar.png differ
diff --git a/icons/Makefile.am b/icons/Makefile.am
index d6a95be..08c7ea8 100644
--- a/icons/Makefile.am
+++ b/icons/Makefile.am
@@ -4,6 +4,8 @@ SUBDIRS =   
\
16x16   \
24x24   \
48x48   \
+   64x64   \
+   128x128 \
scalable
 
 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Update NEWS.

2012-03-26 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 74a3a3d455812b596b6ff5237284b1ac67b3c20e (commit)
   from a29616d7734a28addf1d76f39ae14a3c92cdc4fc (commit)

commit 74a3a3d455812b596b6ff5237284b1ac67b3c20e
Author: Jannis Pohlmann 
Date:   Mon Mar 26 21:54:21 2012 +0100

Update NEWS.

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

diff --git a/NEWS b/NEWS
index 7a4fccd..0859063 100644
--- a/NEWS
+++ b/NEWS
@@ -23,7 +23,8 @@
 - Respect ThunarIconFactory::show-thumbnails. Fixes a regression.
 - Fix crash when removing an ancestor of the current folder (bug #8168).
 - Fix handling %U when launching multiple files with an app (bug #7456).
-- Improve sorting of file names that include numbers (bug #5359).
+- Improve sorting of file names that include numbers (bug #5359,
+  bug #8022, #4269, #5286).
 - Add a "Skip All" button to the file overwrite dialog (bug #4263).
 
 1.3.0
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Initial attempt to implement hex sorting.

2012-03-26 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/hex-sorting
 to dbcc8eb98da3547216e419e0a357d90da7170852 (commit)
   from 0dca6e49ab7bc11c3a3b6582b6a2508307a125aa (commit)

commit dbcc8eb98da3547216e419e0a357d90da7170852
Author: Peter de Ridder 
Date:   Mon Mar 26 20:48:06 2012 +0100

Initial attempt to implement hex sorting.

 thunar/thunar-file.c |   46 ++
 1 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index cb1d781..6af0618 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -3218,6 +3218,10 @@ compare_by_name_using_number (const gchar *ap,
   gcharbc;
   guintskipped_zeros_a;
   guintskipped_zeros_b;
+  const gchar *original_ap = ap;
+  const gchar *original_bp = bp;
+  gcharhex_ac;
+  gcharhex_bc;
 
   /* up until now the numbers match. Now compare the numbers by digit
* count, the longest number is the largest. If the lengths are equal
@@ -3227,7 +3231,8 @@ compare_by_name_using_number (const gchar *ap,
   skipped_zeros_a = skip_leading_zeros (&ap, start_a);
   skipped_zeros_b = skip_leading_zeros (&bp, start_b);
 
-  /* determine the largest number */
+  /* advance until we've reached the end of the shorter one of the two
+   * number strings */
   for (ai = ap, bi = bp;; ++ai, ++bi)
 {
   ac = *ai;
@@ -3236,14 +3241,47 @@ compare_by_name_using_number (const gchar *ap,
 break;
 }
 
-  /* if one of the numbers still has a digit, that number is the largest. */
+  /* check if the two strings are potential hex numbers */
+  if (g_ascii_isxdigit (ac) && g_ascii_isxdigit (bc))
+{
+  /* advance until we hit a non-hex character */
+  for (ai = original_ap, bi = original_bp;; ++ai, ++bi)
+{
+  hex_ac = *ai;
+  hex_bc = *bi;
+  if (!g_ascii_isxdigit (hex_ac) || !g_ascii_isxdigit (hex_bc))
+break;
+}
+
+  /* check if both potential hex numbers end at the same offset */
+  if (!g_ascii_isxdigit (hex_ac) && !g_ascii_isxdigit (hex_bc))
+{
+  /* original_ap, original_bp either point to the first character where
+   * the two strings differ or to the character before that; in the 
second
+   * case we have to advance by one. after that we can perform an ASCII
+   * comparison on the first different character */
+  hex_ac = *original_ap;
+  hex_bc = *original_bp;
+  if (hex_ac == hex_bc)
+{
+  original_ap += 1;
+  original_bp += 1;
+  hex_ac = *original_ap;
+  hex_bc = *original_bp;
+}
+  return hex_ac - hex_bc;
+}
+}
+
+  /* if one of the number strings continues while the other has already
+   * stopped at the current offset, that first number is larger */
   if (g_ascii_isdigit (ac))
 return 1;
   else if (g_ascii_isdigit (bc))
 return -1;
 
-  /* both numbers have the same length. look for the first digit that
-   * is different */
+  /* both number strings have the same length. look for the first digit
+   * that is different */
   for (;; ++ap, ++bp)
 {
   ac = *ap;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Creating branch jannis/hex-sorting

2012-03-26 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/hex-sorting
 as new branch
 to 0dca6e49ab7bc11c3a3b6582b6a2508307a125aa (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/jannis/hex-sorting

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Add a "Skip All" button to the file overwrite dialog (bug #4263).

2012-03-13 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 0dca6e49ab7bc11c3a3b6582b6a2508307a125aa (commit)
   from 2d4e4abba012a4df994d07dbfe1f818fa8eb49e9 (commit)

commit 0dca6e49ab7bc11c3a3b6582b6a2508307a125aa
Author: Eric Koegel 
Date:   Tue Mar 13 22:17:00 2012 +

Add a "Skip All" button to the file overwrite dialog (bug #4263).

 NEWS|1 +
 thunar/thunar-dialogs.c |2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index 0de1e7c..7a4fccd 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,7 @@
 - Fix crash when removing an ancestor of the current folder (bug #8168).
 - Fix handling %U when launching multiple files with an app (bug #7456).
 - Improve sorting of file names that include numbers (bug #5359).
+- Add a "Skip All" button to the file overwrite dialog (bug #4263).
 
 1.3.0
 =
diff --git a/thunar/thunar-dialogs.c b/thunar/thunar-dialogs.c
index b79391c..b6fe037 100644
--- a/thunar/thunar-dialogs.c
+++ b/thunar/thunar-dialogs.c
@@ -505,6 +505,7 @@ thunar_dialogs_show_job_ask_replace (GtkWindow  *parent,
 | GTK_DIALOG_NO_SEPARATOR
 | GTK_DIALOG_DESTROY_WITH_PARENT,
 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+_("S_kip All"), 
THUNAR_JOB_RESPONSE_NO_ALL,
 _("_Skip"), THUNAR_JOB_RESPONSE_NO,
 _("Replace _All"), 
THUNAR_JOB_RESPONSE_YES_ALL,
 _("_Replace"), THUNAR_JOB_RESPONSE_YES,
@@ -513,6 +514,7 @@ thunar_dialogs_show_job_ask_replace (GtkWindow  *parent,
THUNAR_JOB_RESPONSE_YES,
THUNAR_JOB_RESPONSE_YES_ALL,
THUNAR_JOB_RESPONSE_NO,
+   THUNAR_JOB_RESPONSE_NO_ALL,
GTK_RESPONSE_CANCEL,
-1);
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), 
THUNAR_JOB_RESPONSE_YES);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Improve sorting of file names that include numbers (bug #5359).

2012-02-26 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to b501fe002028f83d75959d37023f0812b3675dac (commit)
   from 16055b933c938886488c06b402e68e7383318a3a (commit)

commit b501fe002028f83d75959d37023f0812b3675dac
Author: Peter de Ridder 
Date:   Mon Feb 27 00:42:11 2012 +

Improve sorting of file names that include numbers (bug #5359).

This commit improves the handling of leading zeros of numbers in file
names. Previously, the order was not always predictable and was also
often incorrect.

 NEWS |1 +
 thunar/thunar-file.c |  155 ++---
 2 files changed, 121 insertions(+), 35 deletions(-)

diff --git a/NEWS b/NEWS
index 328b18a..0de1e7c 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,7 @@
 - Respect ThunarIconFactory::show-thumbnails. Fixes a regression.
 - Fix crash when removing an ancestor of the current folder (bug #8168).
 - Fix handling %U when launching multiple files with an app (bug #7456).
+- Improve sorting of file names that include numbers (bug #5359).
 
 1.3.0
 =
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 4090d9f..cb1d781 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -3173,28 +3173,96 @@ thunar_file_destroy (ThunarFile *file)
 
 
 
-static gint
-compare_by_name_using_number (const gchar *ap,
-  const gchar *bp)
+static guint
+skip_leading_zeros (const gchar **ap,
+const gchar  *name)
 {
-  guint64 anum;
-  guint64 bnum;
+  const gchar *bp;
+  guintskipped_zeros = 0;
 
-  /* determine the numbers in ap and bp */
-  anum = strtouq (ap, NULL, 10);
-  bnum = strtouq (bp, NULL, 10);
+  /* do a backward search to check if the number starts with a '0' */
+  for (bp = *ap; bp >= name; --bp)
+{
+  if (*bp != '0')
+break;
+}
 
-  /* compare the numbers */
-  if (anum < bnum)
-return -1;
-  else if (anum > bnum)
+  /* if the number starts with a '0' skip all following '0' */
+  if (!g_ascii_isdigit (*bp) || *bp == '0')
+   {
+ for (bp = *ap; *bp != '\0'; ++bp)
+   {
+ if (*bp != '0')
+   break;
+   }
+
+ skipped_zeros = bp - *ap;
+ *ap = bp;
+ return skipped_zeros;
+   }
+
+  return 0;
+}
+
+
+
+static gint
+compare_by_name_using_number (const gchar *ap,
+  const gchar *bp,
+  const gchar *start_a,
+  const gchar *start_b)
+{
+  const gchar *ai;
+  const gchar *bi;
+  gcharac;
+  gcharbc;
+  guintskipped_zeros_a;
+  guintskipped_zeros_b;
+
+  /* up until now the numbers match. Now compare the numbers by digit
+   * count, the longest number is the largest. If the lengths are equal
+   * compare the digits. */
+
+  /* skip leading zeros of both numbers */
+  skipped_zeros_a = skip_leading_zeros (&ap, start_a);
+  skipped_zeros_b = skip_leading_zeros (&bp, start_b);
+
+  /* determine the largest number */
+  for (ai = ap, bi = bp;; ++ai, ++bi)
+{
+  ac = *ai;
+  bc = *bi;
+  if (!g_ascii_isdigit (ac) || !g_ascii_isdigit (bc))
+break;
+}
+
+  /* if one of the numbers still has a digit, that number is the largest. */
+  if (g_ascii_isdigit (ac))
 return 1;
+  else if (g_ascii_isdigit (bc))
+return -1;
 
-  /* the numbers are equal, and so the higher first digit should
-   * be sorted first, i.e. 'file10' before 'file010', since we
-   * also sort 'file10' before 'file011'.
-   */
-  return (*bp - *ap);
+  /* both numbers have the same length. look for the first digit that
+   * is different */
+  for (;; ++ap, ++bp)
+{
+  ac = *ap;
+  bc = *bp;
+
+  /* check if the characters differ or we have a non-digit char */
+  if (ac != bc || !g_ascii_isdigit (ac))
+break;
+}
+
+  /* if we have reached the end of the numbers and they are still equal,
+   * then they differ only in the number of leading zeros. let us always
+   * sort the one with more leading zeros first. */
+  if (G_UNLIKELY (!g_ascii_isdigit (ac) || !g_ascii_isdigit (bc)))
+return skipped_zeros_b - skipped_zeros_a;
+  
+  /* for all regular numbers that have the same length, the one with the
+   * lowest different digit should be sorted first */
+  return (ac - bc);
 }
 
 
@@ -3218,8 +3286,10 @@ thunar_file_compare_by_name (const ThunarFile *file_a,
 {
   const gchar *ap;
   const gchar *bp;
-  guintac;
-  guintbc;
+  const gchar *filename_a;
+  const gchar *filename_b;
+  guchar   ac;
+  guchar   bc;
 
 #ifdef G_ENABLE_DEBUG
   /* probably too expensive to do the instance check every time
@@ -3230,8 +3300,12 @@ thunar_file_compare_by_name (const ThunarFile *file_a,
 #endif
 
   /* we compare only the display names (UTF-8!) */
-  ap = thunar_file_get_display_name (file_a);
-  bp = thunar_file_get_display_name (file_b);
+  filename_a = thunar_file_get_display_name (file_a);
+  filename_b = thunar_file_get_

[Xfce4-commits] Fix handling %U when launching multiple files with an app (bug #7456).

2012-02-26 Thread Jannis Pohlmann
Updating branch refs/heads/xfce-4.8
 to 379b8b9f350cb362735eb0e2a0e9471a898f2664 (commit)
   from 71f6f207cfd0194a3f3db83cb5fab694a5036e22 (commit)

commit 379b8b9f350cb362735eb0e2a0e9471a898f2664
Author: John Lindgren 
Date:   Sun Feb 26 18:52:24 2012 +

Fix handling %U when launching multiple files with an app (bug #7456).

GIO returns a newly allocated GAppInfo every time
g_app_info_get_default_for_type() is called. This means that if we use a
GHashTable and g_direct_hash() to associate GAppInfos with files to be
launched with each of them, we will actually end up with multiple
GAppInfos that are the same, and each of them will only have a single
file associated.

To fix this, we now use a fake hash function that causes GHashTable to
always search the GAppInfo in the collision list.

 NEWS |1 +
 thunar/thunar-launcher.c |   17 ++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index f91553e..eb1d02e 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@
 - Fix sorting of filenames with large numbers (bug #5356).
   Patch by Erik Koegel.
 - Fix crash when removing an ancestor of the current folder (bug #8168).
+- Fix handling %U when launching multiple files with an app (bug #7456).
 
 1.2.3
 =
diff --git a/thunar/thunar-launcher.c b/thunar/thunar-launcher.c
index f479cf9..9f96b87 100644
--- a/thunar/thunar-launcher.c
+++ b/thunar/thunar-launcher.c
@@ -546,17 +546,28 @@ thunar_launcher_execute_files (ThunarLauncher *launcher,
 
 
 
+static guint
+thunar_launcher_g_app_info_hash (gconstpointer app_info)
+{
+  return 0;
+}
+
+
+
 static void
 thunar_launcher_open_files (ThunarLauncher *launcher,
 GList  *files)
 {
-  GAppInfo   *app_info;
   GHashTable *applications;
+  GAppInfo   *app_info;
   GList  *file_list;
   GList  *lp;
 
-  /* allocate a hash table to associate applications to URIs */
-  applications = g_hash_table_new_full (g_direct_hash,
+  /* allocate a hash table to associate applications to URIs. since GIO 
allocates
+   * new GAppInfo objects every time, g_direct_hash does not work. we therefor 
use
+   * a fake hash function to always hit the collision list of the hash table 
and
+   * avoid storing multiple equal GAppInfos by means of g_app_info_equal(). */
+  applications = g_hash_table_new_full (thunar_launcher_g_app_info_hash,
 (GEqualFunc) g_app_info_equal,
 (GDestroyNotify) g_object_unref,
 (GDestroyNotify) 
thunar_g_file_list_free);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix handling %U when launching multiple files with an app (bug #7456).

2012-02-26 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 16055b933c938886488c06b402e68e7383318a3a (commit)
   from d47f4053b1ea47299f5ef501cd98e5d5c7cf2026 (commit)

commit 16055b933c938886488c06b402e68e7383318a3a
Author: John Lindgren 
Date:   Sun Feb 26 18:52:24 2012 +

Fix handling %U when launching multiple files with an app (bug #7456).

GIO returns a newly allocated GAppInfo every time
g_app_info_get_default_for_type() is called. This means that if we use a
GHashTable and g_direct_hash() to associate GAppInfos with files to be
launched with each of them, we will actually end up with multiple
GAppInfos that are the same, and each of them will only have a single
file associated.

To fix this, we now use a fake hash function that causes GHashTable to
always search the GAppInfo in the collision list.

 NEWS |1 +
 thunar/thunar-launcher.c |   17 ++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index f840b87..328b18a 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,7 @@
   Patch by Eric Koegel.
 - Respect ThunarIconFactory::show-thumbnails. Fixes a regression.
 - Fix crash when removing an ancestor of the current folder (bug #8168).
+- Fix handling %U when launching multiple files with an app (bug #7456).
 
 1.3.0
 =
diff --git a/thunar/thunar-launcher.c b/thunar/thunar-launcher.c
index 6d31dee..f525f89 100644
--- a/thunar/thunar-launcher.c
+++ b/thunar/thunar-launcher.c
@@ -546,17 +546,28 @@ thunar_launcher_execute_files (ThunarLauncher *launcher,
 
 
 
+static guint
+thunar_launcher_g_app_info_hash (gconstpointer app_info)
+{
+  return 0;
+}
+
+
+
 static void
 thunar_launcher_open_files (ThunarLauncher *launcher,
 GList  *files)
 {
-  GAppInfo   *app_info;
   GHashTable *applications;
+  GAppInfo   *app_info;
   GList  *file_list;
   GList  *lp;
 
-  /* allocate a hash table to associate applications to URIs */
-  applications = g_hash_table_new_full (g_direct_hash,
+  /* allocate a hash table to associate applications to URIs. since GIO 
allocates
+   * new GAppInfo objects every time, g_direct_hash does not work. we therefor 
use
+   * a fake hash function to always hit the collision list of the hash table 
and
+   * avoid storing multiple equal GAppInfos by means of g_app_info_equal(). */
+  applications = g_hash_table_new_full (thunar_launcher_g_app_info_hash,
 (GEqualFunc) g_app_info_equal,
 (GDestroyNotify) g_object_unref,
 (GDestroyNotify) 
thunar_g_file_list_free);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix crash when removing an ancestor of the current folder (bug #8168).

2012-02-26 Thread Jannis Pohlmann
Updating branch refs/heads/xfce-4.8
 to 71f6f207cfd0194a3f3db83cb5fab694a5036e22 (commit)
   from aff99d32251455d163c26fce78f2dd6056b874aa (commit)

commit 71f6f207cfd0194a3f3db83cb5fab694a5036e22
Author: Jannis Pohlmann 
Date:   Sun Feb 26 17:38:50 2012 +

Fix crash when removing an ancestor of the current folder (bug #8168).

Whenever we release the GFileMonitor of a ThunarFolder, we also need to
disconnect from its signals. Otherwise one of the signal handlers might
still be called, potentially with corrupted user data (which was the
case here).

 NEWS   |1 +
 thunar/thunar-folder.c |2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index a0cb0dd..f91553e 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@
 =
 - Fix sorting of filenames with large numbers (bug #5356).
   Patch by Erik Koegel.
+- Fix crash when removing an ancestor of the current folder (bug #8168).
 
 1.2.3
 =
diff --git a/thunar/thunar-folder.c b/thunar/thunar-folder.c
index 62015fe..4076b8d 100644
--- a/thunar/thunar-folder.c
+++ b/thunar/thunar-folder.c
@@ -236,6 +236,7 @@ thunar_folder_finalize (GObject *object)
   /* disconnect from the file alteration monitor */
   if (G_LIKELY (folder->monitor != NULL))
 {
+  g_signal_handlers_disconnect_matched (folder->monitor, 
G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, folder);
   g_file_monitor_cancel (folder->monitor);
   g_object_unref (folder->monitor);
 }
@@ -705,6 +706,7 @@ thunar_folder_reload (ThunarFolder *folder)
   /* disconnect from the file alteration monitor */
   if (G_UNLIKELY (folder->monitor != NULL))
 {
+  g_signal_handlers_disconnect_matched (folder->monitor, 
G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, folder);
   g_file_monitor_cancel (folder->monitor);
   g_object_unref (folder->monitor);
   folder->monitor = NULL;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix crash when removing an ancestor of the current folder (bug #8168).

2012-02-26 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to d47f4053b1ea47299f5ef501cd98e5d5c7cf2026 (commit)
   from 16c99c3c0550d440a8e83cf3fb0775bb04065ab6 (commit)

commit d47f4053b1ea47299f5ef501cd98e5d5c7cf2026
Author: Jannis Pohlmann 
Date:   Sun Feb 26 17:38:50 2012 +

Fix crash when removing an ancestor of the current folder (bug #8168).

Whenever we release the GFileMonitor of a ThunarFolder, we also need to
disconnect from its signals. Otherwise one of the signal handlers might
still be called, potentially with corrupted user data (which was the
case here).

 NEWS   |1 +
 thunar/thunar-folder.c |2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index c02e6a5..f840b87 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,7 @@
 - Fix sorting of filenames with large numbers (bug #5356).
   Patch by Eric Koegel.
 - Respect ThunarIconFactory::show-thumbnails. Fixes a regression.
+- Fix crash when removing an ancestor of the current folder (bug #8168).
 
 1.3.0
 =
diff --git a/thunar/thunar-folder.c b/thunar/thunar-folder.c
index 73eb774..9ea6939 100644
--- a/thunar/thunar-folder.c
+++ b/thunar/thunar-folder.c
@@ -238,6 +238,7 @@ thunar_folder_finalize (GObject *object)
   /* disconnect from the file alteration monitor */
   if (G_LIKELY (folder->monitor != NULL))
 {
+  g_signal_handlers_disconnect_matched (folder->monitor, 
G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, folder);
   g_file_monitor_cancel (folder->monitor);
   g_object_unref (folder->monitor);
 }
@@ -769,6 +770,7 @@ thunar_folder_reload (ThunarFolder *folder)
   /* disconnect from the file alteration monitor */
   if (G_UNLIKELY (folder->monitor != NULL))
 {
+  g_signal_handlers_disconnect_matched (folder->monitor, 
G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, folder);
   g_file_monitor_cancel (folder->monitor);
   g_object_unref (folder->monitor);
   folder->monitor = NULL;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Avoid accessing list elements after they have been freed (bug #7418).

2012-02-25 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 3704cf3502bc8cafb4e7cd7956c0ae983a415b3e (commit)
   from 52802adb3361e9d3202d4a921b8b440660878ee1 (commit)

commit 3704cf3502bc8cafb4e7cd7956c0ae983a415b3e
Author: Jannis Pohlmann 
Date:   Sat Feb 25 15:09:30 2012 +

Avoid accessing list elements after they have been freed (bug #7418).

 NEWS   |1 +
 tumblerd/tumbler-manager.c |7 ++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index bcb3e8e..18426ce 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@
 - Call dbus_g_thread_init() to fix threading issues (bug #7544).
 - Add application/vnd.rn-realmedia to the ffmpeg plugin (bug #6949).
 - Explicitly link against gmodule (bug #8466).
+- Avoid accessing list elements after they have been freed (bug #7418).
 
 0.1.23
 ==
diff --git a/tumblerd/tumbler-manager.c b/tumblerd/tumbler-manager.c
index cb8af5c..e8bf162 100644
--- a/tumblerd/tumbler-manager.c
+++ b/tumblerd/tumbler-manager.c
@@ -1433,6 +1433,7 @@ tumbler_manager_directory_deleted (TumblerManager 
*manager,
   GList   *delete_keys = NULL;
   GList  **list;
   GList   *lp;
+  GList   *next;
   gchar  **hash_keys;
   guintn;
 
@@ -1454,9 +1455,10 @@ tumbler_manager_directory_deleted (TumblerManager 
*manager,
   g_assert (*list != NULL);
 
   /* iterate over all thumbnailers in the current list */
-  for (lp = *list; lp != NULL; lp = lp->next)
+  for (lp = *list; lp != NULL; )
 {
   info = lp->data;
+  next = lp->next;
 
   /* check if the thumbnailer info comes from the deleted directory */
   if (info->dir_index == dir_index)
@@ -1508,6 +1510,9 @@ tumbler_manager_directory_deleted (TumblerManager 
*manager,
   /* destroy the thumbnailer info */
   thumbnailer_info_free (info);
 }
+
+  /* advance to the next entry in the list */
+  lp = next;
 }
 
   if (*list == NULL)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Explicitly link against gmodule (bug #8466).

2012-02-24 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 52802adb3361e9d3202d4a921b8b440660878ee1 (commit)
   from 6d3cdc19e0f4479349bf106fcba9d8128b58d4bf (commit)

commit 52802adb3361e9d3202d4a921b8b440660878ee1
Author: Lionel Le Folgoc 
Date:   Fri Feb 24 17:17:00 2012 +

Explicitly link against gmodule (bug #8466).

 NEWS|1 +
 configure.ac|1 +
 tumbler/Makefile.am |2 ++
 3 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index ee01a49..bcb3e8e 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@
 - Link all plugins that use rint() against libm (bug #8236).
 - Call dbus_g_thread_init() to fix threading issues (bug #7544).
 - Add application/vnd.rn-realmedia to the ffmpeg plugin (bug #6949).
+- Explicitly link against gmodule (bug #8466).
 
 0.1.23
 ==
diff --git a/configure.ac b/configure.ac
index 4297873..2cbbbe6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -148,6 +148,7 @@ dnl *** Check for required packages ***
 dnl ***
 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16.0])
 PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.16.0])
+PKG_CHECK_MODULES([GMODULE], [gmodule-2.0 >= 2.10.0])
 PKG_CHECK_MODULES([GTHREAD], [gthread-2.0 >= 2.16.0])
 PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.0.0])
 PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1 >= 0.72])
diff --git a/tumbler/Makefile.am b/tumbler/Makefile.am
index f2cdcd9..505db5e 100644
--- a/tumbler/Makefile.am
+++ b/tumbler/Makefile.am
@@ -82,6 +82,7 @@ libtumbler_1_la_CFLAGS =  
\
$(GDK_PIXBUF_CFLAGS)\
$(GIO_CFLAGS)   \
$(GLIB_CFLAGS)  \
+   $(GMODULE_CFLAGS)   \
$(GTHREAD_CFLAGS)   \
$(PLATFORM_CFLAGS)  \
$(PLATFORM_CPPFLAGS)
@@ -96,6 +97,7 @@ libtumbler_1_la_LIBADD =  
\
$(GDK_PIXBUF_LIBS)  \
$(GIO_LIBS) \
$(GLIB_LIBS)\
+   $(GMODULE_LIBS) \
$(GTHREAD_LIBS)
 
 EXTRA_DIST =   \
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Add application/vnd.rn-realmedia to the ffmpeg plugin (bug #6949).

2012-02-24 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 6d3cdc19e0f4479349bf106fcba9d8128b58d4bf (commit)
   from c48cb86cf91f46c3d90358c118de8003752ec5b0 (commit)

commit 6d3cdc19e0f4479349bf106fcba9d8128b58d4bf
Author: churchmice 
Date:   Fri Feb 24 17:05:53 2012 +

Add application/vnd.rn-realmedia to the ffmpeg plugin (bug #6949).

 NEWS   |1 +
 .../ffmpeg-thumbnailer-provider.c  |1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index ee3678a..ee01a49 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@
 - Update COPYING to the latest version of GPL2 (bug #7796).
 - Link all plugins that use rint() against libm (bug #8236).
 - Call dbus_g_thread_init() to fix threading issues (bug #7544).
+- Add application/vnd.rn-realmedia to the ffmpeg plugin (bug #6949).
 
 0.1.23
 ==
diff --git a/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer-provider.c 
b/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer-provider.c
index fd880a6..02389b8 100644
--- a/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer-provider.c
+++ b/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer-provider.c
@@ -113,6 +113,7 @@ ffmpeg_thumbnailer_provider_get_thumbnailers 
(TumblerThumbnailerProvider *provid
 "video/x-msvideo",
 "video/x-flv",
 "application/x-flash-video",
+"application/vnd.rn-realmedia",
 "video/3gpp",
 "video/x-matroska",
 "video/ogg",
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Call dbus_g_thread_init() to hopefully fix threading issues (bug #7544).

2012-02-24 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to c48cb86cf91f46c3d90358c118de8003752ec5b0 (commit)
   from 492d5ac36af25b4555723b070c497e3d1e3f5a9b (commit)

commit c48cb86cf91f46c3d90358c118de8003752ec5b0
Author: Jannis Pohlmann 
Date:   Fri Feb 24 16:55:46 2012 +

Call dbus_g_thread_init() to hopefully fix threading issues (bug #7544).

 NEWS|1 +
 tumblerd/main.c |5 -
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index d5589c6..ee3678a 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@
 =
 - Update COPYING to the latest version of GPL2 (bug #7796).
 - Link all plugins that use rint() against libm (bug #8236).
+- Call dbus_g_thread_init() to fix threading issues (bug #7544).
 
 0.1.23
 ==
diff --git a/tumblerd/main.c b/tumblerd/main.c
index 7972345..e34b135 100644
--- a/tumblerd/main.c
+++ b/tumblerd/main.c
@@ -1,6 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009-2011 Jannis Pohlmann 
+ * Copyright (c) 2009-2012 Jannis Pohlmann 
  *
  * This program is free software; you can redistribute it and/or 
  * modify it under the terms of the GNU General Public License as
@@ -89,6 +89,9 @@ main (intargc,
   if (!g_thread_supported ())
 g_thread_init (NULL);
 
+  /* initial the D-Bus threading system */
+  dbus_g_thread_init ();
+
   /* try to connect to the D-Bus session bus */
   connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Update NEWS (the previous commit should have fixed bug #8236).

2012-02-24 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 492d5ac36af25b4555723b070c497e3d1e3f5a9b (commit)
   from 88507955ba898d4a53241c5d542137ca35c02aac (commit)

commit 492d5ac36af25b4555723b070c497e3d1e3f5a9b
Author: Jannis Pohlmann 
Date:   Fri Feb 24 16:38:02 2012 +

Update NEWS (the previous commit should have fixed bug #8236).

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

diff --git a/NEWS b/NEWS
index e9563fb..d5589c6 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 0.1.x
 =
 - Update COPYING to the latest version of GPL2 (bug #7796).
+- Link all plugins that use rint() against libm (bug #8236).
 
 0.1.23
 ==
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Link all plugins that use rint() against libm (-lm).

2012-02-24 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 88507955ba898d4a53241c5d542137ca35c02aac (commit)
   from 42f0d96dc78e5ef13d9d74aaf2e86bf6ee27efa4 (commit)

commit 88507955ba898d4a53241c5d542137ca35c02aac
Author: Jannis Pohlmann 
Date:   Fri Feb 24 16:37:05 2012 +

Link all plugins that use rint() against libm (-lm).

 plugins/ffmpeg-thumbnailer/Makefile.am  |5 +++--
 plugins/font-thumbnailer/Makefile.am|5 +++--
 plugins/jpeg-thumbnailer/Makefile.am|5 +++--
 plugins/odf-thumbnailer/Makefile.am |4 +++-
 plugins/pixbuf-thumbnailer/Makefile.am  |5 +++--
 plugins/poppler-thumbnailer/Makefile.am |5 +++--
 plugins/raw-thumbnailer/Makefile.am |4 +++-
 7 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/plugins/ffmpeg-thumbnailer/Makefile.am 
b/plugins/ffmpeg-thumbnailer/Makefile.am
index e3e5d6e..39f7ad6 100644
--- a/plugins/ffmpeg-thumbnailer/Makefile.am
+++ b/plugins/ffmpeg-thumbnailer/Makefile.am
@@ -1,6 +1,6 @@
 # vi:set ts=8 sw=8 noet ai nocindent:
 # -
-# Copyright (c) 2009-2010 Jannis Pohlmann 
+# Copyright (c) 2009-2012 Jannis Pohlmann 
 # 
 # This program is free software; you can redistribute it and/or 
 # modify it under the terms of the GNU General Public License as
@@ -55,7 +55,8 @@ tumbler_ffmpeg_thumbnailer_la_LIBADD =
\
$(GDK_PIXBUF_LIBS)  \
$(GIO_LIBS) \
$(GLIB_LIBS)\
-   $(FFMPEGTHUMBNAILER_LIBS)
+   $(FFMPEGTHUMBNAILER_LIBS)   \
+   -lm
 
 tumbler_ffmpeg_thumbnailer_la_DEPENDENCIES =   \
$(top_builddir)/tumbler/libtumbler-$(TUMBLER_VERSION_API).la
diff --git a/plugins/font-thumbnailer/Makefile.am 
b/plugins/font-thumbnailer/Makefile.am
index fda0c0d..d3318df 100644
--- a/plugins/font-thumbnailer/Makefile.am
+++ b/plugins/font-thumbnailer/Makefile.am
@@ -1,6 +1,6 @@
 # vi:set ts=8 sw=8 noet ai nocindent:
 # -
-# Copyright (c) 2009-2010 Jannis Pohlmann 
+# Copyright (c) 2009-2012 Jannis Pohlmann 
 # 
 # This program is free software; you can redistribute it and/or 
 # modify it under the terms of the GNU General Public License as
@@ -55,7 +55,8 @@ tumbler_font_thumbnailer_la_LIBADD =  
\
$(GDK_PIXBUF_LIBS)  \
$(GIO_LIBS) \
$(GLIB_LIBS)\
-   $(FREETYPE_LIBS)
+   $(FREETYPE_LIBS)\
+   -lm
 
 tumbler_font_thumbnailer_la_DEPENDENCIES = \
$(top_builddir)/tumbler/libtumbler-$(TUMBLER_VERSION_API).la
diff --git a/plugins/jpeg-thumbnailer/Makefile.am 
b/plugins/jpeg-thumbnailer/Makefile.am
index 0606af2..93dee1f 100644
--- a/plugins/jpeg-thumbnailer/Makefile.am
+++ b/plugins/jpeg-thumbnailer/Makefile.am
@@ -1,6 +1,6 @@
 # vi:set ts=8 sw=8 noet ai nocindent:
 # -
-# Copyright (c) 2009-2010 Jannis Pohlmann 
+# Copyright (c) 2009-2012 Jannis Pohlmann 
 # 
 # This program is free software; you can redistribute it and/or 
 # modify it under the terms of the GNU General Public License as
@@ -55,7 +55,8 @@ tumbler_jpeg_thumbnailer_la_LIBADD =  
\
$(GDK_PIXBUF_LIBS)  \
$(GIO_LIBS) \
$(GLIB_LIBS)\
-   $(LIBJPEG_LIBS)
+   $(LIBJPEG_LIBS) \
+   -lm
 
 tumbler_jpeg_thumbnailer_la_DEPENDENCIES = \
$(top_builddir)/tumbler/libtumbler-$(TUMBLER_VERSION_API).la
diff --git a/plugins/odf-thumbnailer/Makefile.am 
b/plugins/odf-thumbnailer/Makefile.am
index faf0a6e..8f11e0d 100644
--- a/plugins/odf-thumbnailer/Makefile.am
+++ b/plugins/odf-thumbnailer/Makefile.am
@@ -1,6 +1,7 @@
 # vi:set ts=8 sw=8 noet ai nocindent:
 # -
 # Copyright (c) 2011 Nick Schermer 
+# Copyright (c) 2012 Jannis Pohlmann 
 # 
 # This program is free software; you can redistribute it and/or 
 # modify it under the terms of the GNU General Public License as
@@ -55,7 +56,8 @@ tumbler_odf_thumbnailer_la_LIBADD =   
\
$(GDK_PIXBUF_LIBS)  \
$(GIO_LIBS) \
$(GLIB_LIBS)\
-   $(GSF_LIBS)
+   $(GSF_LIBS) \
+   -lm
 
 tumbler_odf_thumbnailer_la_DEPENDENCIES =  \
$(top_builddir)/tumbler/libtumbler-$(TUMBLER_VERSION_API).la

[Xfce4-commits] Force side pane eject buttons to have no inner border by default.

2012-02-24 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to e661ebab7192f9380c63413b0800ca7a55f1326e (commit)
   from 8c9570cf8750b06e547e197d39f1608e7724f66f (commit)

commit e661ebab7192f9380c63413b0800ca7a55f1326e
Author: Jannis Pohlmann 
Date:   Fri Feb 24 15:45:31 2012 +

Force side pane eject buttons to have no inner border by default.

This can reduce the height of the shortcuts by a few pixels.

 thunar/thunar-shortcut.c  |   14 ++
 thunar/thunar-statusbar.c |1 +
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/thunar/thunar-shortcut.c b/thunar/thunar-shortcut.c
index a73863f..5db48ae 100644
--- a/thunar/thunar-shortcut.c
+++ b/thunar/thunar-shortcut.c
@@ -225,6 +225,8 @@ static guint shortcut_signals[LAST_SIGNAL];
 static void
 thunar_shortcut_class_init (ThunarShortcutClass *klass)
 {
+  static gboolean style_initialized = FALSE;
+
   GtkWidgetClass *gtkwidget_class;
   GObjectClass   *gobject_class;
 
@@ -390,6 +392,18 @@ thunar_shortcut_class_init (ThunarShortcutClass *klass)
   0, NULL, NULL,
   g_cclosure_marshal_VOID__VOID,
   G_TYPE_NONE, 0);
+
+  if (!style_initialized)
+{
+  gtk_rc_parse_string ("style \"thunar-shortcut-internal\" {\n"
+   "  GtkButton::inner-border = { 0, 0, 0, 0 }\n"
+   "  GtkButton::child-displacement-x = 0\n"
+   "  GtkButton::child-displacement-y = 0\n"
+   "}\n"
+   "widget_class \"*.ThunarShortcut.*.GtkButton\" "
+   "  style \"thunar-shortcut-internal\"\n");
+  style_initialized = TRUE;
+}
 }
 
 
diff --git a/thunar/thunar-statusbar.c b/thunar/thunar-statusbar.c
index 3b8533b..4bee6c0 100644
--- a/thunar/thunar-statusbar.c
+++ b/thunar/thunar-statusbar.c
@@ -94,6 +94,7 @@ thunar_statusbar_class_init (ThunarStatusbarClass *klass)
"}\n"
"class \"ThunarStatusbar\" "
"style \"thunar-statusbar-internal\"\n");
+  style_initialized = TRUE;
 }
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Add missing $(GLIB_LIBS) in tests Makefile.am.

2012-02-20 Thread Jannis Pohlmann
Updating branch refs/heads/xfce-4.8
 to 96f0821260051822f15969ecec225cc85e46e677 (commit)
   from fa0261d20dc5500bd5fcb45ffa4ea6fb83dc3f2f (commit)

commit 96f0821260051822f15969ecec225cc85e46e677
Author: Yves-Alexis Perez 
Date:   Thu Sep 8 10:25:05 2011 +0200

Add missing $(GLIB_LIBS) in tests Makefile.am.

 tests/Makefile.am |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3503c2b..4af4858 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -39,6 +39,7 @@ test_exo_noop_DEPENDENCIES =  
\
$(top_builddir)/exo/libexo-$(LIBEXO_VERSION_API).la
 
 test_exo_noop_LDADD =  \
+   $(GLIB_LIBS)\
$(top_builddir)/exo/libexo-$(LIBEXO_VERSION_API).la
 
 test_exo_string_SOURCES =  \
@@ -52,6 +53,7 @@ test_exo_string_DEPENDENCIES =
\
$(top_builddir)/exo/libexo-$(LIBEXO_VERSION_API).la
 
 test_exo_string_LDADD =
\
+   $(GLIB_LIBS)\
$(top_builddir)/exo/libexo-$(LIBEXO_VERSION_API).la
 
 test_exo_icon_chooser_dialog_SOURCES = \
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits



[Xfce4-commits] Add missing -lm.

2012-02-20 Thread Jannis Pohlmann
Updating branch refs/heads/xfce-4.8
 to fa0261d20dc5500bd5fcb45ffa4ea6fb83dc3f2f (commit)
   from f4005565c8d8b6df6170c86c796e71a0ba0334e2 (commit)

commit fa0261d20dc5500bd5fcb45ffa4ea6fb83dc3f2f
Author: Yves-Alexis Perez 
Date:   Thu Sep 8 10:26:33 2011 +0200

Add missing -lm.

Libpng removed -lm so we need to include this ourselfs.

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

diff --git a/exo/Makefile.am b/exo/Makefile.am
index 46c3790..bf30234 100644
--- a/exo/Makefile.am
+++ b/exo/Makefile.am
@@ -105,7 +105,8 @@ libexo_1_la_LIBADD =
\
$(GIO_LIBS) \
$(GTK_LIBS) \
$(LIBX11_LIBS)  \
-   $(LIBXFCE4UTIL_LIBS)
+   $(LIBXFCE4UTIL_LIBS)\
+   -lm
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = exo-$(LIBEXO_VERSION_API).pc
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Use 32 instead of 36 pixels for small icons.

2012-02-04 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 2147190c02c2ece7a924752a8d63bcf45e5568af (commit)
   from 1863f2c8e08c774f4273d424d00863a36fae5ad6 (commit)

commit 2147190c02c2ece7a924752a8d63bcf45e5568af
Author: Jannis Pohlmann 
Date:   Sat Feb 4 11:56:23 2012 +

Use 32 instead of 36 pixels for small icons.

It feels like a more sensible choice as 36px is not among the common
icon sizes such as 16, 24, 32, 48 etc., meaning that all icons loaded
from icon themes need to be rescaled when using 36px.

 thunar/thunar-enum-types.h|2 +-
 thunar/thunar-icon-factory.c  |2 +-
 thunar/thunar-icon-renderer.c |4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/thunar/thunar-enum-types.h b/thunar/thunar-enum-types.h
index c5f78ba..8b4db52 100644
--- a/thunar/thunar-enum-types.h
+++ b/thunar/thunar-enum-types.h
@@ -151,7 +151,7 @@ typedef enum
 {
   THUNAR_ICON_SIZE_SMALLEST = 16,
   THUNAR_ICON_SIZE_SMALLER  = 24,
-  THUNAR_ICON_SIZE_SMALL= 36,
+  THUNAR_ICON_SIZE_SMALL= 32,
   THUNAR_ICON_SIZE_NORMAL   = 48,
   THUNAR_ICON_SIZE_LARGE= 64,
   THUNAR_ICON_SIZE_LARGER   = 96,
diff --git a/thunar/thunar-icon-factory.c b/thunar/thunar-icon-factory.c
index 4f2ec42..2159720 100644
--- a/thunar/thunar-icon-factory.c
+++ b/thunar/thunar-icon-factory.c
@@ -441,7 +441,7 @@ thunar_icon_factory_load_from_file (ThunarIconFactory 
*factory,
* want to do this for icons displayed in the details view).
*/
   needs_frame = (strstr (path, G_DIR_SEPARATOR_S ".thumbnails" 
G_DIR_SEPARATOR_S) != NULL)
- && (size >= 36) && thumbnail_needs_frame (pixbuf, width, 
height);
+ && (size >= 32) && thumbnail_needs_frame (pixbuf, width, 
height);
 
   /* be sure to make framed thumbnails fit into the size */
   if (G_LIKELY (needs_frame))
diff --git a/thunar/thunar-icon-renderer.c b/thunar/thunar-icon-renderer.c
index d3fed33..4356499 100644
--- a/thunar/thunar-icon-renderer.c
+++ b/thunar/thunar-icon-renderer.c
@@ -470,10 +470,10 @@ thunar_icon_renderer_render (GtkCellRenderer 
*renderer,
   emblem_area.height = gdk_pixbuf_get_height (emblem);
 
   /* shrink insane emblems */
-  if (G_UNLIKELY (MAX (emblem_area.width, emblem_area.height) > 
(gint) MIN ((2 * icon_renderer->size) / 3, 36)))
+  if (G_UNLIKELY (MAX (emblem_area.width, emblem_area.height) > 
(gint) MIN ((2 * icon_renderer->size) / 3, 32)))
 {
   /* scale down the emblem */
-  temp = exo_gdk_pixbuf_scale_ratio (emblem, MIN ((2 * 
icon_renderer->size) / 3, 36));
+  temp = exo_gdk_pixbuf_scale_ratio (emblem, MIN ((2 * 
icon_renderer->size) / 3, 32));
   g_object_unref (G_OBJECT (emblem));
   emblem = temp;
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Separate category contents and titles using a horizontal line.

2012-01-25 Thread Jannis Pohlmann
Updating branch refs/heads/nick/settings-manager
 to 943380aad687945984b50ff8ae3c4ec7c8cd73e0 (commit)
   from b99b994e659f83b853ad9e5cf29e87ea01635c00 (commit)

commit 943380aad687945984b50ff8ae3c4ec7c8cd73e0
Author: Jannis Pohlmann 
Date:   Wed Jan 25 15:42:51 2012 +

Separate category contents and titles using a horizontal line.

 .../xfce-settings-manager-dialog.c |   31 ++--
 1 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/xfce4-settings-manager/xfce-settings-manager-dialog.c 
b/xfce4-settings-manager/xfce-settings-manager-dialog.c
index 29fdac2..097ba4f 100644
--- a/xfce4-settings-manager/xfce-settings-manager-dialog.c
+++ b/xfce4-settings-manager/xfce-settings-manager-dialog.c
@@ -636,9 +636,11 @@ xfce_settings_manager_dialog_add_category 
(XfceSettingsManagerDialog *dialog,
GarconMenuDirectory   
*directory)
 {
 GtkTreeModel*filter;
-GtkWidget   *frame;
-GtkWidget   *label;
+GtkWidget   *alignment;
 GtkWidget   *iconview;
+GtkWidget   *label;
+GtkWidget   *separator;
+GtkWidget   *vbox;
 PangoAttrList   *attrs;
 GtkCellRenderer *render;
 
@@ -648,22 +650,33 @@ xfce_settings_manager_dialog_add_category 
(XfceSettingsManagerDialog *dialog,
 xfce_settings_manager_dialog_filter_category,
 g_object_ref (directory), g_object_unref);
 
-frame = gtk_frame_new (NULL);
-gtk_box_pack_start (GTK_BOX (dialog->category_box), frame, FALSE, TRUE, 0);
-gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
-gtk_container_set_resize_mode (GTK_CONTAINER (frame), 
GTK_RESIZE_IMMEDIATE);
-gtk_widget_show (frame);
+vbox = gtk_vbox_new (FALSE, 0);
+gtk_box_pack_start (GTK_BOX (dialog->category_box), vbox, FALSE, TRUE, 0);
+gtk_widget_show (vbox);
 
+/* create a label for the category title */
 label = gtk_label_new (garcon_menu_directory_get_name (directory));
 attrs = pango_attr_list_new ();
 pango_attr_list_insert (attrs, pango_attr_weight_new (PANGO_WEIGHT_BOLD));
 gtk_label_set_attributes (GTK_LABEL (label), attrs);
 pango_attr_list_unref (attrs);
-gtk_frame_set_label_widget (GTK_FRAME (frame), label);
+gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
+gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
 gtk_widget_show (label);
 
+/* separate title and content using a horizontal line */
+separator = gtk_hseparator_new ();
+gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, TRUE, 0);
+gtk_widget_show (separator);
+
+/* use an alignment to separate the category content from the title */
+alignment = gtk_alignment_new (0.0f, 0.0f, 1.0f, 1.0f);
+gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 0, 0, 0);
+gtk_container_add (GTK_CONTAINER (vbox), alignment);
+gtk_widget_show (alignment);
+
 iconview = exo_icon_view_new_with_model (GTK_TREE_MODEL (filter));
-gtk_container_add (GTK_CONTAINER (frame), iconview);
+gtk_container_add (GTK_CONTAINER (alignment), iconview);
 exo_icon_view_set_orientation (EXO_ICON_VIEW (iconview), 
GTK_ORIENTATION_HORIZONTAL);
 exo_icon_view_set_margin (EXO_ICON_VIEW (iconview), 0);
 exo_icon_view_set_single_click (EXO_ICON_VIEW (iconview), TRUE);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Move DND to ThunarShortcutGroup, start with creating shortcuts via DND.

2012-01-23 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 8c9570cf8750b06e547e197d39f1608e7724f66f (commit)
   from 0941a545ebea71dd0b6c6272bd188760b5b87827 (commit)

commit 8c9570cf8750b06e547e197d39f1608e7724f66f
Author: Jannis Pohlmann 
Date:   Tue Jan 24 01:46:53 2012 +

Move DND to ThunarShortcutGroup, start with creating shortcuts via DND.

The empty spot indicator for text/uri-list should really just be a thin
line, not a huge empty block.

 TODO   |   14 ++
 thunar/thunar-shortcut-group.c |  204 +++--
 thunar/thunar-shortcut.c   |  324 ++--
 thunar/thunar-shortcut.h   |8 +-
 4 files changed, 256 insertions(+), 294 deletions(-)

diff --git a/TODO b/TODO
index 7547d2a..c5f677e 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,17 @@
+Branch jannis/new-shortcuts-pane
+
+
+ - Reordering shortcuts may not change the order or position of immutable
+   shortcuts. That still needs to be implemented in ThunarShortcutGroup.
+
+ - Dragging a URI to the new shortcuts pane must either cause an empty
+   spot indicator to show up or must indicate possible drop actions on
+   the current shortcut. The latter already works, the empty spot
+   indicator still needs to be implemented.
+
+ -
+
+
 Important for Thunar 1.2
 
 
diff --git a/thunar/thunar-shortcut-group.c b/thunar/thunar-shortcut-group.c
index c00d15e..28b0230 100644
--- a/thunar/thunar-shortcut-group.c
+++ b/thunar/thunar-shortcut-group.c
@@ -1,6 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2011 Jannis Pohlmann 
+ * Copyright (c) 2011-2012 Jannis Pohlmann 
  *
  * This program is free software; you can redistribute it and/or 
  * modify it under the terms of the GNU General Public License as
@@ -27,9 +27,11 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
+#include 
 
 
 
@@ -95,6 +97,8 @@ static void thunar_shortcut_group_expand_style_set 
(ThunarShortcutGroup
 GtkWidget  
*expander);
 static void thunar_shortcut_group_apply_indentation
(ThunarShortcutGroup*group,
 ThunarShortcut 
*shortcut);
+static void thunar_shortcut_group_drag_highlight   
(ThunarShortcutGroup*group,
+ThunarShortcut 
*shortcut);
 static gboolean thunar_shortcut_group_find_child_by_coords 
(ThunarShortcutGroup*group,
 gint   
 x,
 gint   
 y,
@@ -128,6 +132,7 @@ struct _ThunarShortcutGroup
 
   guint  drop_data_ready : 1;
   guint  drop_occurred : 1;
+  GList *drop_file_list;
 
   GtkWidget *drag_shortcut;
   GdkPixmap *drag_snapshot;
@@ -440,11 +445,19 @@ thunar_shortcut_group_drag_data_received (GtkWidget   
 *widget,
   GdkDragContext   *context,
   gint  x,
   gint  y,
-  GtkSelectionData *data,
+  GtkSelectionData *selection_data,
   guint info,
   guint timestamp)
 {
   ThunarShortcutGroup *group = THUNAR_SHORTCUT_GROUP (widget);
+  ThunarShortcut  *shortcut;
+  GtkAllocationallocation;
+  ThunarFile  *file;
+  GdkDragActionaction = 0;
+  GdkDragActionactions = 0;
+  GtkWidget   *child = NULL;
+  gboolean success = FALSE;
+  gint child_index;
 
   _thunar_return_if_fail (THUNAR_IS_SHORTCUT_GROUP (widget));
   _thunar_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
@@ -454,11 +467,82 @@ thunar_shortcut_group_drag_data_received (GtkWidget   
 *widget,
   /* only read data if we don't have it yet */
   if (!group->drop_data_ready)
 {
+  /* extract the URI list from the selection data (if valid) */
+  if (info == THUNAR_DND_TARGET_TEXT_URI_LIST
+  && selection_data->format == 8
+  && selection_data->length > 0)
+{
+  group->drop_file_list =
+thunar_g_file_list_new_from_string ((const gchar *) 
selection_data->data);
+}
+
+  /* reset the state */
+  group->drop_data_ready = TRUE;
 }
 
   if (group->drop_occurred)
 {
+  /* reset the drop state */
   group->drop_occurred = FALSE;
+
+  /* translate the y

[Xfce4-commits] Minor adjustments to use the right icon, drop thunar_file_get_icon().

2012-01-23 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 0941a545ebea71dd0b6c6272bd188760b5b87827 (commit)
   from d82316d6863147902a61d65e3bfe7537f60055bb (commit)

commit 0941a545ebea71dd0b6c6272bd188760b5b87827
Author: Jannis Pohlmann 
Date:   Tue Dec 27 12:44:24 2011 +0100

Minor adjustments to use the right icon, drop thunar_file_get_icon().

 thunar/thunar-file.c   |   22 --
 thunar/thunar-file.h   |1 -
 thunar/thunar-shortcut-group.c |2 +-
 thunar/thunar-shortcut.c   |   32 
 4 files changed, 25 insertions(+), 32 deletions(-)

diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 4441ece..c321ec5 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -2980,28 +2980,6 @@ thunar_file_get_custom_icon (const ThunarFile *file)
 
 
 /**
- * thunar_file_get_icon:
- * @file : a #ThunarFile instance.
- *
- * Returns the icon for @file if any, else %NULL is returned.
- *
- * Return value: the icon for @file or %NULL, the GIcon is owner
- * by the file, so do not unref it.
- **/
-GIcon *
-thunar_file_get_icon (const ThunarFile *file)
-{
-  _thunar_return_val_if_fail (THUNAR_IS_FILE (file), NULL);
-
-  if (file->info == NULL)
-return NULL;
-
-  return g_file_info_get_icon (file->info);
-}
-
-
-
-/**
  * thunar_file_get_preview_icon:
  * @file : a #ThunarFile instance.
  *
diff --git a/thunar/thunar-file.h b/thunar/thunar-file.h
index ff424ce..ea94a95 100644
--- a/thunar/thunar-file.h
+++ b/thunar/thunar-file.h
@@ -242,7 +242,6 @@ const gchar *thunar_file_get_thumbnail_path(const 
ThunarFile*fil
 gboolean thunar_file_is_thumbnail  (const ThunarFile
*file);
 void thunar_file_set_thumb_state   (ThunarFile  
*file, 
 ThunarFileThumbState 
state);
-GIcon*thunar_file_get_icon (const ThunarFile
*file);
 GIcon*thunar_file_get_preview_icon (const ThunarFile
*file);
 gchar*thunar_file_get_icon_name(const ThunarFile
*file,
 ThunarFileIconState 
icon_state,
diff --git a/thunar/thunar-shortcut-group.c b/thunar/thunar-shortcut-group.c
index 7e58847..c00d15e 100644
--- a/thunar/thunar-shortcut-group.c
+++ b/thunar/thunar-shortcut-group.c
@@ -37,7 +37,7 @@
 #define THUNAR_SHORTCUT_GROUP_FLASH_TIMES 3
 
 #define THUNAR_SHORTCUT_GROUP_MARKUP \
-  "%s"
+  "%s"
 
 
 
diff --git a/thunar/thunar-shortcut.c b/thunar/thunar-shortcut.c
index 8beca47..5417b36 100644
--- a/thunar/thunar-shortcut.c
+++ b/thunar/thunar-shortcut.c
@@ -1316,11 +1316,13 @@ thunar_shortcut_matches_types (ThunarShortcut
*shortcut,
 static void
 thunar_shortcut_update (ThunarShortcut *shortcut)
 {
-  const gchar *display_name;
-  GIcon   *icon;
-  gchar   *base_name;
-  gchar   *name;
-  gchar   *uri;
+  GtkIconTheme *icon_theme;
+  const gchar  *display_name;
+  GIcon*icon = NULL;
+  gchar*base_name;
+  gchar*icon_name;
+  gchar*name;
+  gchar*uri;
 
   _thunar_return_if_fail (THUNAR_IS_SHORTCUT (shortcut));
 
@@ -1339,13 +1341,23 @@ thunar_shortcut_update (ThunarShortcut *shortcut)
   thunar_shortcut_set_name (shortcut, display_name);
 
   /* update the icon of the shortcut */
-  icon = thunar_file_get_icon (shortcut->file);
+  icon_theme = gtk_icon_theme_get_default ();
+  icon_name = thunar_file_get_icon_name (shortcut->file, 
+ 
THUNAR_FILE_ICON_STATE_DEFAULT,
+ icon_theme);
+  g_debug ("%30s has icon name %s and custom icon %p",
+   thunar_shortcut_get_display_name (shortcut),
+   icon_name,
+   shortcut->custom_icon);
+  if (icon_name != NULL)
+icon = g_themed_icon_new (icon_name);
   thunar_shortcut_set_icon (shortcut, icon);
+  g_object_unref (icon);
+  g_free (icon_name);
 
   if (thunar_file_get_kind (shortcut->file) == G_FILE_TYPE_MOUNTABLE)
 {
-  g_debug ("%s is mountable",
-   display_name);
+  g_debug ("%s is mountable", display_name);
 }
 }
   else if (shortcut->location != NULL)
@@ -2112,6 +2124,10 @@ thunar_shortcut_set_icon (ThunarShortcut *shortcut,
   _thunar_return_if_fail (THUNAR_IS_SHORTCUT (shortcut));
   _thunar_return_if_fail (icon == NULL || G_IS_ICON (icon));
 
+  g_debug ("%30s set icon to %s",
+   thunar_shortcut_get_display_name (shortcut),
+   icon ? g_icon_to_string (icon) : NULL);
+
   if (icon == NULL && !shortcut->constructed)
 return;
 
___

[Xfce4-commits] Post-release version bump.

2012-01-16 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 1edbcced363245e0e8336620a66308ec49d3b5b5 (commit)
   from a1a5604add74f97928f8684f3d27d67cb25f4677 (commit)

commit 1edbcced363245e0e8336620a66308ec49d3b5b5
Author: Jannis Pohlmann 
Date:   Mon Jan 16 14:56:18 2012 +

Post-release version bump.

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

diff --git a/NEWS b/NEWS
index 5acf867..7ebf0bd 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+4.9.x
+=
+
 4.9.1
 =
 - Add support for LT_PREREQ (bug #6920).
diff --git a/configure.in.in b/configure.in.in
index a1f2afe..76e5065 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -14,7 +14,7 @@ m4_define([xdt_version_minor], [9])
 m4_define([xdt_version_micro], [1])
 m4_define([xdt_version_nano], [])
 m4_define([xdt_version_build], [@REVISION@])
-m4_define([xdt_version_tag], [])
+m4_define([xdt_version_tag], [git])
 m4_define([xdt_version], 
[xdt_version_major().xdt_version_minor().xdt_version_micro()ifelse(xdt_version_nano(),
 [], [], [.xdt_version_nano()])ifelse(xdt_version_tag(), [git], 
[xdt_version_tag()-xdt_version_build()], [])])
 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Creating annotated tag xfce4-dev-tools-4.9.1

2012-01-16 Thread Jannis Pohlmann
Updating annotated tag refs/tags/xfce4-dev-tools-4.9.1
 as new annotated tag
 to cc2a383786f9031ee1092a4ae7ccb10fef409c97 (tag)
   succeeds xfce4-dev-tools-4.9.0-5-g32eb2f4
  tagged by Jannis Pohlmann 
 on 2012-01-16 15:53 +0100

Jannis Pohlmann (1):
  Release 4.9.1!

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


[Xfce4-commits] Release 4.9.1!

2012-01-16 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to a1a5604add74f97928f8684f3d27d67cb25f4677 (commit)
   from 32eb2f4a298a77a1fcdaf3a3977c2abf1d63c26f (commit)

commit a1a5604add74f97928f8684f3d27d67cb25f4677
Author: Jannis Pohlmann 
Date:   Mon Jan 16 14:51:26 2012 +

Release 4.9.1!

 NEWS|7 +++
 configure.in.in |4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 6428ef8..5acf867 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+4.9.1
+=
+- Add support for LT_PREREQ (bug #6920).
+- Remove spec file and rpm build target.
+- Do not create a gzip tarball.
+- Never use xdt-autogen in autogen.sh.
+
 4.9.0
 =
 - Fix FSF address and add missing licenses.
diff --git a/configure.in.in b/configure.in.in
index b2236c4..a1f2afe 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -11,10 +11,10 @@ dnl *** Version information ***
 dnl ***
 m4_define([xdt_version_major], [4])
 m4_define([xdt_version_minor], [9])
-m4_define([xdt_version_micro], [0])
+m4_define([xdt_version_micro], [1])
 m4_define([xdt_version_nano], [])
 m4_define([xdt_version_build], [@REVISION@])
-m4_define([xdt_version_tag], [git])
+m4_define([xdt_version_tag], [])
 m4_define([xdt_version], 
[xdt_version_major().xdt_version_minor().xdt_version_micro()ifelse(xdt_version_nano(),
 [], [], [.xdt_version_nano()])ifelse(xdt_version_tag(), [git], 
[xdt_version_tag()-xdt_version_build()], [])])
 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Make sure to include PLATFORM flags everywhere.

2011-12-27 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 2ca7f4438c3565498d4dfab43d0d85af8750d097 (commit)
   from aae52f0684b1b5da995982c97a2d731ca7cf0c37 (commit)

commit 2ca7f4438c3565498d4dfab43d0d85af8750d097
Author: Jannis Pohlmann 
Date:   Tue Dec 27 14:35:58 2011 +0100

Make sure to include PLATFORM flags everywhere.

 docs/reference/tumbler/Makefile.am  |6 +-
 docs/reference/tumbler/tumbler-sections.txt |  338 ++-
 plugins/ffmpeg-thumbnailer/Makefile.am  |1 +
 plugins/font-thumbnailer/Makefile.am|1 +
 plugins/gst-thumbnailer/Makefile.am |1 +
 plugins/jpeg-thumbnailer/Makefile.am|1 +
 plugins/odf-thumbnailer/Makefile.am |1 +
 plugins/pixbuf-thumbnailer/Makefile.am  |1 +
 plugins/poppler-thumbnailer/Makefile.am |1 +
 plugins/raw-thumbnailer/Makefile.am |1 +
 plugins/xdg-cache/Makefile.am   |1 +
 tumbler/Makefile.am |3 +-
 tumblerd/Makefile.am|7 +-
 13 files changed, 192 insertions(+), 171 deletions(-)

diff --git a/docs/reference/tumbler/Makefile.am 
b/docs/reference/tumbler/Makefile.am
index 7512d41..bbd61db 100644
--- a/docs/reference/tumbler/Makefile.am
+++ b/docs/reference/tumbler/Makefile.am
@@ -65,8 +65,10 @@ INCLUDES =   
\
$(GIO_CFLAGS)   \
$(GLIB_CFLAGS)  \
$(GTHREAD_CFLAGS)   \
-   $(PNG_CFLAGS)   \
-   $(GTK_DOC_EXTRA_CFLAGS)
+   $(GTK_DOC_EXTRA_CFLAGS) \
+   $(PLATFORM_CFLAGS)  \
+   $(PLATFORM_CPPFLAGS)\
+   $(PNG_CFLAGS)
 
 GTKDOC_LIBS =  \
$(DBUS_LIBS)\
diff --git a/docs/reference/tumbler/tumbler-sections.txt 
b/docs/reference/tumbler/tumbler-sections.txt
index 146584b..408dc22 100644
--- a/docs/reference/tumbler/tumbler-sections.txt
+++ b/docs/reference/tumbler/tumbler-sections.txt
@@ -1,235 +1,241 @@
 
-tumbler-provider-plugin
-tumbler_provider_plugin_new
-tumbler_provider_plugin_get_types
-TumblerProviderPluginClass
-TumblerProviderPlugin
-
-TUMBLER_PROVIDER_PLUGIN
-TUMBLER_IS_PROVIDER_PLUGIN
-TUMBLER_TYPE_PROVIDER_PLUGIN
-tumbler_provider_plugin_get_type
-TUMBLER_PROVIDER_PLUGIN_CLASS
-TUMBLER_IS_PROVIDER_PLUGIN_CLASS
-TUMBLER_PROVIDER_PLUGIN_GET_CLASS
-
+stamp-tumbler-marshal
 
-
-tumbler-thumbnailer-provider
-TumblerThumbnailerProvider
-TumblerThumbnailerProviderIface
-tumbler_thumbnailer_provider_get_thumbnailers
-
-TUMBLER_THUMBNAILER_PROVIDER
-TUMBLER_IS_THUMBNAILER_PROVIDER
-TUMBLER_TYPE_THUMBNAILER_PROVIDER
-tumbler_thumbnailer_provider_get_type
-TUMBLER_THUMBNAILER_PROVIDER_GET_IFACE
-
-
-
-tumbler-thumbnail
-TumblerThumbnail
-TumblerImageData
-TumblerThumbnailIface
-tumbler_thumbnail_load
-tumbler_thumbnail_needs_update
-tumbler_thumbnail_save_image_data
-tumbler_thumbnail_save_file
-tumbler_thumbnail_get_flavor
-
-TUMBLER_THUMBNAIL
-TUMBLER_IS_THUMBNAIL
-TUMBLER_TYPE_THUMBNAIL
-tumbler_thumbnail_get_type
-TUMBLER_THUMBNAIL_GET_IFACE
 
 
 
-tumbler-provider-factory
-tumbler_provider_factory_get_default
-tumbler_provider_factory_get_providers
-TumblerProviderFactoryClass
-TumblerProviderFactory
-
-TUMBLER_PROVIDER_FACTORY
-TUMBLER_IS_PROVIDER_FACTORY
-TUMBLER_TYPE_PROVIDER_FACTORY
-tumbler_provider_factory_get_type
-TUMBLER_PROVIDER_FACTORY_CLASS
-TUMBLER_IS_PROVIDER_FACTORY_CLASS
-TUMBLER_PROVIDER_FACTORY_GET_CLASS
-
-
-
-tumbler-thumbnailer
-TumblerThumbnailer
-TumblerThumbnailerIface
-tumbler_thumbnailer_create
-tumbler_thumbnailer_get_hash_keys
-tumbler_thumbnailer_get_mime_types
-tumbler_thumbnailer_get_uri_schemes
-tumbler_thumbnailer_supports_hash_key
-tumbler_thumbnailer_array_copy
-tumbler_thumbnailer_array_free
-
-TUMBLER_THUMBNAILER
-TUMBLER_IS_THUMBNAILER
-TUMBLER_TYPE_THUMBNAILER
-tumbler_thumbnailer_get_type
-TUMBLER_THUMBNAILER_GET_IFACE
+tumbler
+TUMBLER_INSIDE_TUMBLER_H
 
 
 
 tumbler-abstract-thumbnailer
 TumblerAbstractThumbnailer
 TumblerAbstractThumbnailerClass
-TumblerAbstractThumbnailerPrivate
 
 TUMBLER_ABSTRACT_THUMBNAILER
+TUMBLER_ABSTRACT_THUMBNAILER_CLASS
+TUMBLER_ABSTRACT_THUMBNAILER_GET_CLASS
 TUMBLER_IS_ABSTRACT_THUMBNAILER
+TUMBLER_IS_ABSTRACT_THUMBNAILER_CLASS
 TUMBLER_TYPE_ABSTRACT_THUMBNAILER
+TumblerAbstractThumbnailerPrivate
 tumbler_abstract_thumbnailer_get_type
-TUMBLER_ABSTRACT_THUMBNAILER_CLASS
-TUMBLER_IS_ABSTRACT_THUMBNAILER_CLASS
-TUMBLER_ABSTRACT_THUMBNAILER_GET_CLASS
-
-
-
-tumbler-thumbnail-flavor
-tumbler_thumbnail_flavor_new
-tumbler_thumbnail_flavor_new_normal
-tumbler_thumbnail_flavor_new_large

[Xfce4-commits] Update COPYING to the latest version of GPL2 (bug #7796).

2011-12-27 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to aae52f0684b1b5da995982c97a2d731ca7cf0c37 (commit)
   from db6793037f0fb1e5debfb019cebfa2d554e6416b (commit)

commit aae52f0684b1b5da995982c97a2d731ca7cf0c37
Author: Jannis Pohlmann 
Date:   Tue Dec 27 13:50:23 2011 +0100

Update COPYING to the latest version of GPL2 (bug #7796).

 COPYING |   41 -
 NEWS|4 
 2 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/COPYING b/COPYING
index d60c31a..d159169 100644
--- a/COPYING
+++ b/COPYING
@@ -1,12 +1,12 @@
-   GNU GENERAL PUBLIC LICENSE
-  Version 2, June 1991
+GNU GENERAL PUBLIC LICENSE
+   Version 2, June 1991
 
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
-   Preamble
+Preamble
 
   The licenses for most software are designed to take away your
 freedom to share and change it.  By contrast, the GNU General Public
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its 
users.  This
 General Public License applies to most of the Free Software
 Foundation's software and to any other program whose authors commit to
 using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
+the GNU Lesser General Public License instead.)  You can apply it to
 your programs, too.
 
   When we speak of free software, we are referring to freedom, not
@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not 
licensed at all.
 
   The precise terms and conditions for copying, distribution and
 modification follow.
-
-   GNU GENERAL PUBLIC LICENSE
+
+GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
   0. This License applies to any program or other work which contains
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
 License.  (Exception: if the Program itself is interactive but
 does not normally print such an announcement, your work based on
 the Program is not required to print an announcement.)
-
+
 These requirements apply to the modified work as a whole.  If
 identifiable sections of that work are not derived from the Program,
 and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering 
equivalent
 access to copy the source code from the same place counts as
 distribution of the source code, even though third parties are not
 compelled to copy the source along with the object code.
-
+
   4. You may not copy, modify, sublicense, or distribute the Program
 except as expressly provided under this License.  Any attempt
 otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@ impose that choice.
 
 This section is intended to make thoroughly clear what is believed to
 be a consequence of the rest of this License.
-
+
   8. If the distribution and/or use of the Program is restricted in
 certain countries either by patents or by copyrighted interfaces, the
 original copyright holder who places the Program under this License
@@ -255,7 +255,7 @@ make exceptions for this.  Our decision will be guided by 
the two goals
 of preserving the free status of all derivatives of our free software and
 of promoting the sharing and reuse of software generally.
 
-   NO WARRANTY
+NO WARRANTY
 
   11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE 
WITH ANY OTHER
 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGES.
 
-END OF TERMS AND CONDITIONS
-
-   How to Apply These Terms to Your New Programs
+ END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
 
   If you develop a new program, and you want it to be of the greatest
 possible use to the public, the best way to achieve this is to make it
@@ -303,17 +303,16 @@ the "copyright" line and a pointer to where the full 
notice is found.
 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 

[Xfce4-commits] Respect ThunarIconFactory::show-thumbnails. Fixes a regression.

2011-12-27 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to dfc55a2b3a3769b3846500136dc393cfde0ae523 (commit)
   from 679ad00ae31e1d48d061635f186f79e18981d5f0 (commit)

commit dfc55a2b3a3769b3846500136dc393cfde0ae523
Author: Jannis Pohlmann 
Date:   Tue Dec 27 13:12:38 2011 +0100

Respect ThunarIconFactory::show-thumbnails. Fixes a regression.

Whenever show-thumbnails is toggled, we need to either show thumbnails
again immediately or cancel any pending requests to put tumbler back
into idle mode.

 NEWS  |1 +
 thunar/thunar-standard-view.c |   52 +
 2 files changed, 48 insertions(+), 5 deletions(-)

diff --git a/NEWS b/NEWS
index 015a7cf..c02e6a5 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,7 @@
   Fix by Lionel Le Folgoc.
 - Fix sorting of filenames with large numbers (bug #5356).
   Patch by Eric Koegel.
+- Respect ThunarIconFactory::show-thumbnails. Fixes a regression.
 
 1.3.0
 =
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index 2478d7e..356488d 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -266,6 +266,9 @@ static void 
thunar_standard_view_cancel_thumbnailing(Thu
 static void thunar_standard_view_schedule_thumbnail_timeout 
(ThunarStandardView   *standard_view);
 static void thunar_standard_view_schedule_thumbnail_idle
(ThunarStandardView   *standard_view);
 static gboolean thunar_standard_view_request_thumbnails 
(ThunarStandardView   *standard_view);
+static void thunar_standard_view_show_thumbnails_toggled
(ThunarStandardView   *standard_view,
+ 
GParamSpec   *pspec,
+ 
ThunarIconFactory*icon_factory);
 static void thunar_standard_view_scrolled   
(GtkAdjustment*adjustment,
  
ThunarStandardView   *standard_view);
 static void thunar_standard_view_size_allocate  
(ThunarStandardView   *standard_view,
@@ -913,7 +916,10 @@ thunar_standard_view_realize (GtkWidget *widget)
   standard_view->icon_factory = thunar_icon_factory_get_for_icon_theme 
(icon_theme);
 
   /* we need to redraw whenever the "show-thumbnails" property is toggled */
-  g_signal_connect_swapped (G_OBJECT (standard_view->icon_factory), 
"notify::show-thumbnails", G_CALLBACK (gtk_widget_queue_draw), standard_view);
+  g_signal_connect_swapped (standard_view->icon_factory,
+"notify::show-thumbnails",
+G_CALLBACK 
(thunar_standard_view_show_thumbnails_toggled),
+standard_view);
 }
 
 
@@ -3380,17 +3386,22 @@ thunar_standard_view_request_thumbnails 
(ThunarStandardView *standard_view)
   GtkTreePath *path;
   GtkTreeIter  iter;
   ThunarFile  *file;
+  gboolean show_thumbnails;
   gboolean valid_iter;
   GList   *visible_files = NULL;
 
   _thunar_return_val_if_fail (THUNAR_IS_STANDARD_VIEW (standard_view), FALSE);
 
+  /* determine whether the user wants us to create thumbnails */
+  g_object_get (standard_view->icon_factory, "show-thumbnails", 
&show_thumbnails, NULL);
+
+  /* do nothing if we are not supposed to show thumbnails at all */
+  if (!show_thumbnails)
+return FALSE;
+
   /* reschedule the source if we're still loading the folder */
   if (thunar_view_get_loading (THUNAR_VIEW (standard_view)))
-{
-  g_debug ("weird, this should never happen");
-  return TRUE;
-}
+return TRUE;
 
   /* compute visible item range */
   if ((*THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->get_visible_range) 
(standard_view,
@@ -3447,6 +3458,37 @@ thunar_standard_view_request_thumbnails 
(ThunarStandardView *standard_view)
 
 
 static void
+thunar_standard_view_show_thumbnails_toggled (ThunarStandardView 
*standard_view,
+  GParamSpec *pspec,
+  ThunarIconFactory  *icon_factory)
+{
+  GtkAdjustment *vadjustment;
+  gboolean   show_thumbnails;
+
+  _thunar_return_if_fail (THUNAR_IS_STANDARD_VIEW (standard_view));
+  _thunar_return_if_fail (THUNAR_IS_ICON_FACTORY (icon_factory));
+
+  /* check whether the user wants us to generate thumbnails */
+  g_object_get (icon_factory, "show-thumbnails", &show_thumbnails, NULL);
+  if (show_thumbnails)
+{
+  /* get the vertical adjustment of the view */
+  vadjustment = 
+gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW 
(standard_view));
+
+  /* fake a scroll event to generate thumbnail reque

[Xfce4-commits] Move all reorder DND into ThunarShortcutGroup. Add group context menu.

2011-12-25 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to d82316d6863147902a61d65e3bfe7537f60055bb (commit)
   from 5d320f84075019e4a61e8abf79ca0705f74bc399 (commit)

commit d82316d6863147902a61d65e3bfe7537f60055bb
Author: Jannis Pohlmann 
Date:   Mon Dec 26 00:17:27 2011 +0100

Move all reorder DND into ThunarShortcutGroup. Add group context menu.

The group context menu lists all shortcuts and allows their visibility
to be toggled. In the future the visibility of all shortcuts will be
remembered so that users can hide items permanently.

 thunar/thunar-shortcut-group.c |  431 ++--
 thunar/thunar-shortcut.c   |  104 +-
 thunar/thunar-shortcut.h   |2 +-
 3 files changed, 337 insertions(+), 200 deletions(-)

diff --git a/thunar/thunar-shortcut-group.c b/thunar/thunar-shortcut-group.c
index 114fb85..7e58847 100644
--- a/thunar/thunar-shortcut-group.c
+++ b/thunar/thunar-shortcut-group.c
@@ -36,6 +36,9 @@
 #define THUNAR_SHORTCUT_GROUP_FLASH_TIMEOUT 300
 #define THUNAR_SHORTCUT_GROUP_FLASH_TIMES 3
 
+#define THUNAR_SHORTCUT_GROUP_MARKUP \
+  "%s"
+
 
 
 /* property identifiers */
@@ -59,6 +62,10 @@ static void thunar_shortcut_group_set_property 
(GObject
 guint  
 prop_id,
 const GValue   
*value,
 GParamSpec 
*pspec);
+static gboolean thunar_shortcut_group_button_press_event   (GtkWidget  
*widget,
+GdkEventButton 
*event);
+static void thunar_shortcut_group_drag_begin   (GtkWidget  
*widget,
+GdkDragContext 
*context);
 static void thunar_shortcut_group_drag_data_received   (GtkWidget  
*widget,
 GdkDragContext 
*context,
 gint   
 x,
@@ -71,6 +78,8 @@ static gboolean thunar_shortcut_group_drag_drop
(GtkWidget
 gint   
 x,
 gint   
 y,
 guint  
 timestamp);
+static void thunar_shortcut_group_drag_end (GtkWidget  
*widget,
+GdkDragContext 
*context);
 static void thunar_shortcut_group_drag_leave   (GtkWidget  
*widget,
 GdkDragContext 
*context,
 guint  
 timestamp);
@@ -91,7 +100,10 @@ static gboolean thunar_shortcut_group_find_child_by_coords 
(ThunarShortcutGroup
 gint   
 y,
 GtkWidget  
   **child,
 gint   
*child_index);
-
+static void thunar_shortcut_group_show_group_menu  
(ThunarShortcutGroup*group,
+GdkEventButton 
*event);
+static void thunar_shortcut_group_menu_item_toggled(GtkCheckMenuItem   
*item,
+
ThunarShortcutGroup*group);
 
 
 struct _ThunarShortcutGroupClass
@@ -105,6 +117,8 @@ struct _ThunarShortcutGroup
 
   ThunarShortcutType accepted_types;
 
+  gchar *label;
+
   GtkWidget *shortcuts;
   GtkSizeGroup  *size_group;
   GtkWidget *empty_spot;
@@ -114,7 +128,11 @@ struct _ThunarShortcutGroup
 
   guint  drop_data_ready : 1;
   guint  drop_occurred : 1;
-  ThunarShortcut*drop_shortcut;
+
+  GtkWidget *drag_shortcut;
+  GdkPixmap *drag_snapshot;
+  gint   drag_source_x;
+  gint   drag_source_y;
 };
 
 
@@ -123,10 +141,15 @@ G_DEFINE_TYPE (ThunarShortcutGroup, 
thunar_shortcut_group, GTK_TYPE_EXPANDER)
 
 
 
+static const GtkTargetEntry drag_targets[] =
+{
+  { "THUNAR_DND_TARGET_SHORTCUT", GTK_TARGET_SAME_WIDGET, 
THUNAR_DND_TARGET_SHORTCUT },
+};
+
 static const GtkTargetEntry drop_targets[] =
 {
   { "text/uri-list", 0, THUNAR_DND_TARGET_TEXT_URI_LIST },
-  { "THUNAR_DND_TARGET_SHORTCUT", GTK_TARGET_SAME_APP, 
THUNAR_DND_TARGET_SHORTCUT },
+  { "THUNAR_DND_TARGET_SHORTCUT", GTK_TARGET_SAME_WIDGET, 
THUNA

[Xfce4-commits] Continue reordering via DND. It sort of works but is unfinished.

2011-12-24 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 5d320f84075019e4a61e8abf79ca0705f74bc399 (commit)
   from 7695d02ce8ab279163c23fb24e5d3d46493fae4e (commit)

commit 5d320f84075019e4a61e8abf79ca0705f74bc399
Author: Jannis Pohlmann 
Date:   Sun Dec 25 02:55:13 2011 +0100

Continue reordering via DND. It sort of works but is unfinished.

We should probably drop the GtkVBox for the shortcuts in a
ThunarShortcutGroup and just implement the layout mechanism inside the
group. That would allow us to fake the empty spot indicator instead of
using a real GtkImage widget. The empty spot indicator is cool as it
delivers a feeling of direct manipulation. However, using a real widget
causes a mix of ThunarShortcut and GtkImage widgets inside the vertical
box of the group, which is kind of ugly. We should just render the
indicator but not use a real widget.

Other than that, reordering via DND works now. Shortcuts only
temporarily remain in their new positions until the ThunarShortcutsView
is destroyed. Windows are out of sync.

 thunar/thunar-enum-types.c |5 +-
 thunar/thunar-enum-types.h |1 +
 thunar/thunar-shortcut-group.c |  416 ++--
 thunar/thunar-shortcut-group.h |5 -
 thunar/thunar-shortcut.c   |   43 +++--
 thunar/thunar-shortcut.h   |  109 ++-
 6 files changed, 394 insertions(+), 185 deletions(-)

diff --git a/thunar/thunar-enum-types.c b/thunar/thunar-enum-types.c
index 4ede8f2..355af7f 100644
--- a/thunar/thunar-enum-types.c
+++ b/thunar/thunar-enum-types.c
@@ -371,8 +371,9 @@ thunar_dnd_target_get_type (void)
 {
   static const GEnumValue values[] =
   {
-{ THUNAR_DND_TARGET_SHORTCUT, "THUNAR_DND_TARGET_SHORTCUT", 
"shortcut", },
-{ 0,  NULL, NULL,  
 },
+{ THUNAR_DND_TARGET_SHORTCUT,  "THUNAR_DND_TARGET_SHORTCUT",  
"shortcut", },
+{ THUNAR_DND_TARGET_TEXT_URI_LIST, "THUNAR_DND_TARGET_TEXT_URI_LIST", 
"text/uri-list" },
+{ 0,   NULL,  
NULL,   },
   };
 
   type = g_enum_register_static (I_("ThunarDNDTarget"), values);
diff --git a/thunar/thunar-enum-types.h b/thunar/thunar-enum-types.h
index b25014b..944573e 100644
--- a/thunar/thunar-enum-types.h
+++ b/thunar/thunar-enum-types.h
@@ -325,6 +325,7 @@ GType thunar_shortcut_type_get_type (void) G_GNUC_CONST;
 typedef enum
 {
   THUNAR_DND_TARGET_SHORTCUT,
+  THUNAR_DND_TARGET_TEXT_URI_LIST,
 } ThunarDNDTarget;
 
 GType thunar_dnd_target_get_type (void) G_GNUC_CONST;
diff --git a/thunar/thunar-shortcut-group.c b/thunar/thunar-shortcut-group.c
index 159a047..114fb85 100644
--- a/thunar/thunar-shortcut-group.c
+++ b/thunar/thunar-shortcut-group.c
@@ -48,32 +48,49 @@ enum
 
 
 
-static void thunar_shortcut_group_constructed   (GObject   
 *object);
-static void thunar_shortcut_group_dispose   (GObject   
 *object);
-static void thunar_shortcut_group_finalize  (GObject   
 *object);
-static void thunar_shortcut_group_get_property  (GObject   
 *object,
- guint 
  prop_id,
- GValue
 *value,
- GParamSpec
 *pspec);
-static void thunar_shortcut_group_set_property  (GObject   
 *object,
- guint 
  prop_id,
- const GValue  
 *value,
- GParamSpec
 *pspec);
-static void thunar_shortcut_group_drag_leave(GtkWidget 
 *widget,
- GdkDragContext
 *context,
- guint 
  timestamp);
-static gboolean thunar_shortcut_group_drag_motion   (GtkWidget 
 *widget,
- GdkDragContext
 *context,
- gint  
  x,
- gint  
  y,
- guint 
  timestamp);
-static void thunar_shortcut_group_attract_attention (ThunarShortcutGroup   
 *group);
-static gboolean thunar_shortcut_group_flash_expander(gpointer  
  user_data);
-static void thunar_shortcut_group_expand_style_set  (ThunarShortcutGroup   
 *group,
- 

[Xfce4-commits] Squashme: Continued work on DND reordering. We're getting somewhere.

2011-12-24 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 7695d02ce8ab279163c23fb24e5d3d46493fae4e (commit)
   from 64c8c4a5c3a85abe89368704e8c24f5206f30a92 (commit)

commit 7695d02ce8ab279163c23fb24e5d3d46493fae4e
Author: Jannis Pohlmann 
Date:   Sat Dec 24 16:50:49 2011 +0100

Squashme: Continued work on DND reordering. We're getting somewhere.

 thunar/thunar-shortcut-group.c |  147 ++-
 thunar/thunar-shortcut-group.h |5 ++
 thunar/thunar-shortcut.c   |2 -
 3 files changed, 148 insertions(+), 6 deletions(-)

diff --git a/thunar/thunar-shortcut-group.c b/thunar/thunar-shortcut-group.c
index 8c55ac1..159a047 100644
--- a/thunar/thunar-shortcut-group.c
+++ b/thunar/thunar-shortcut-group.c
@@ -59,6 +59,9 @@ static void thunar_shortcut_group_set_property  
(GObject
  guint 
  prop_id,
  const GValue  
 *value,
  GParamSpec
 *pspec);
+static void thunar_shortcut_group_drag_leave(GtkWidget 
 *widget,
+ GdkDragContext
 *context,
+ guint 
  timestamp);
 static gboolean thunar_shortcut_group_drag_motion   (GtkWidget 
 *widget,
  GdkDragContext
 *context,
  gint  
  x,
@@ -86,6 +89,8 @@ struct _ThunarShortcutGroup
   ThunarShortcutType accepted_types;
 
   GtkWidget *shortcuts;
+  GtkSizeGroup  *size_group;
+  GtkWidget *empty_spot;
 
   guint  flash_idle_id;
   guint  flash_count;
@@ -121,6 +126,7 @@ thunar_shortcut_group_class_init (ThunarShortcutGroupClass 
*klass)
   gobject_class->set_property = thunar_shortcut_group_set_property;
 
   gtkwidget_class = GTK_WIDGET_CLASS (klass);
+  gtkwidget_class->drag_leave = thunar_shortcut_group_drag_leave;
   gtkwidget_class->drag_motion = thunar_shortcut_group_drag_motion;
 
   g_object_class_install_property (gobject_class,
@@ -170,11 +176,21 @@ thunar_shortcut_group_constructed (GObject *object)
 {
   ThunarShortcutGroup *group = THUNAR_SHORTCUT_GROUP (object);
 
+  /* configure the look and feel of the expander */
   gtk_expander_set_use_markup (GTK_EXPANDER (group), TRUE);
   /* TODO make this depend on the last remembered state: */
   gtk_expander_set_expanded (GTK_EXPANDER (group), TRUE);
   gtk_container_set_border_width (GTK_CONTAINER (group), 0);
   gtk_expander_set_spacing (GTK_EXPANDER (group), 0);
+
+  /* create a size group to enforce the same size for all shortcuts */
+  group->size_group = gtk_size_group_new (GTK_SIZE_GROUP_BOTH);
+
+  /* create an empty label to indicate an empty spot when re-ordering 
+   * shortcuts via DND */
+  group->empty_spot = gtk_frame_new (NULL);
+  gtk_frame_set_shadow_type (GTK_FRAME (group->empty_spot), GTK_SHADOW_IN);
+  g_object_ref (group->empty_spot);
 }
 
 
@@ -200,6 +216,12 @@ thunar_shortcut_group_finalize (GObject *object)
   if (group->flash_idle_id > 0)
 g_source_remove (group->flash_idle_id);
 
+  /* release the empty spot label */
+  g_object_unref (group->empty_spot);
+
+  /* release the size group */
+  g_object_unref (group->size_group);
+
   (*G_OBJECT_CLASS (thunar_shortcut_group_parent_class)->finalize) (object);
 }
 
@@ -261,6 +283,27 @@ thunar_shortcut_group_set_property (GObject  *object,
 
 
 
+static void
+thunar_shortcut_group_drag_leave (GtkWidget  *widget,
+  GdkDragContext *context,
+  guint   timestamp)
+{
+  ThunarShortcutGroup *group = THUNAR_SHORTCUT_GROUP (widget);
+
+  _thunar_return_if_fail (THUNAR_IS_SHORTCUT_GROUP (widget));
+  _thunar_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
+
+  /* TODO immediately make the drag source visible again */
+
+  gtk_container_remove (GTK_CONTAINER (group->shortcuts), group->empty_spot);
+
+  /* call the parent's drag_leave() handler */
+  if (GTK_WIDGET_CLASS (thunar_shortcut_group_parent_class)->drag_leave != 
NULL)
+(*GTK_WIDGET_CLASS (thunar_shortcut_group_parent_class)->drag_leave) 
(widget, context, timestamp);
+}
+
+
+
 static gboolean
 thunar_shortcut_group_drag_motion (GtkWidget  *widget,
GdkDragContext *context,
@@ -268,16 +311,59 @@ thunar_shortcut_group_drag_motion (GtkWidget  *widget,
ginty,
guint   timestamp)
 {
-#if 0
   ThunarShortcutGroup *group = THUNAR_SHORTCUT_GROUP (widget);
-#endif
+  ThunarShortcut  *shortcut;
+  GtkAllocati

[Xfce4-commits] Add ThunarDNDTarget enum. Try implement shortcut reorder DND.

2011-12-23 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 37fefbcce950246d7277d82c0df8d91ebb15e326 (commit)
   from ffe9390edb86f1a448b4080f523d3ab6979df363 (commit)

commit 37fefbcce950246d7277d82c0df8d91ebb15e326
Author: Jannis Pohlmann 
Date:   Sat Dec 24 03:34:16 2011 +0100

Add ThunarDNDTarget enum. Try implement shortcut reorder DND.

This is not working but I'm uploading what I have so that others can
have a look.

 thunar/thunar-enum-types.c |   21 +++
 thunar/thunar-enum-types.h |   15 
 thunar/thunar-shortcut-group.c |   44 +++-
 thunar/thunar-shortcut.c   |   74 +++-
 4 files changed, 152 insertions(+), 2 deletions(-)

diff --git a/thunar/thunar-enum-types.c b/thunar/thunar-enum-types.c
index 374d25c..4ede8f2 100644
--- a/thunar/thunar-enum-types.c
+++ b/thunar/thunar-enum-types.c
@@ -359,3 +359,24 @@ thunar_shortcut_type_get_type (void)
 
   return type;
 }
+
+
+
+GType
+thunar_dnd_target_get_type (void)
+{
+  static GType type = G_TYPE_INVALID;
+
+  if (G_UNLIKELY (type == G_TYPE_INVALID))
+{
+  static const GEnumValue values[] =
+  {
+{ THUNAR_DND_TARGET_SHORTCUT, "THUNAR_DND_TARGET_SHORTCUT", 
"shortcut", },
+{ 0,  NULL, NULL,  
 },
+  };
+
+  type = g_enum_register_static (I_("ThunarDNDTarget"), values);
+}
+
+  return type;
+}
diff --git a/thunar/thunar-enum-types.h b/thunar/thunar-enum-types.h
index 68b1f5c..b25014b 100644
--- a/thunar/thunar-enum-types.h
+++ b/thunar/thunar-enum-types.h
@@ -314,6 +314,21 @@ typedef enum
 
 GType thunar_shortcut_type_get_type (void) G_GNUC_CONST;
 
+
+#define THUNAR_TYPE_DND_TARGET (thunar_dnd_target_get_type ())
+
+/**
+ * ThunarDNDTarget:
+ *
+ * Enum for thunar-internal drag-and-drop targets.
+ **/
+typedef enum
+{
+  THUNAR_DND_TARGET_SHORTCUT,
+} ThunarDNDTarget;
+
+GType thunar_dnd_target_get_type (void) G_GNUC_CONST;
+
 G_END_DECLS
 
 #endif /* !__THUNAR_ENUM_TYPES_H__ */
diff --git a/thunar/thunar-shortcut-group.c b/thunar/thunar-shortcut-group.c
index 258877a..4c16439 100644
--- a/thunar/thunar-shortcut-group.c
+++ b/thunar/thunar-shortcut-group.c
@@ -59,6 +59,11 @@ static void thunar_shortcut_group_set_property  
(GObject
  guint 
  prop_id,
  const GValue  
 *value,
  GParamSpec
 *pspec);
+static gboolean thunar_shortcut_group_drag_motion   (GtkWidget 
 *widget,
+ GdkDragContext
 *context,
+ gint  
  x,
+ gint  
  y,
+ guint 
  timestamp);
 static void thunar_shortcut_group_attract_attention (ThunarShortcutGroup   
 *group);
 static gboolean thunar_shortcut_group_flash_expander(gpointer  
  user_data);
 static void thunar_shortcut_group_expand_style_set  (ThunarShortcutGroup   
 *group,
@@ -93,10 +98,18 @@ G_DEFINE_TYPE (ThunarShortcutGroup, thunar_shortcut_group, 
GTK_TYPE_EVENT_BOX)
 
 
 
+static const GtkTargetEntry drop_targets[] =
+{
+  { "THUNAR_DND_TARGET_SHORTCUT", GTK_TARGET_SAME_APP, 
THUNAR_DND_TARGET_SHORTCUT },
+};
+
+
+
 static void
 thunar_shortcut_group_class_init (ThunarShortcutGroupClass *klass)
 {
-  GObjectClass *gobject_class;
+  GtkWidgetClass *gtkwidget_class;
+  GObjectClass   *gobject_class;
 
   /* Determine the parent type class */
   thunar_shortcut_group_parent_class = g_type_class_peek_parent (klass);
@@ -108,6 +121,9 @@ thunar_shortcut_group_class_init (ThunarShortcutGroupClass 
*klass)
   gobject_class->get_property = thunar_shortcut_group_get_property;
   gobject_class->set_property = thunar_shortcut_group_set_property;
 
+  gtkwidget_class = GTK_WIDGET_CLASS (klass);
+  gtkwidget_class->drag_motion = thunar_shortcut_group_drag_motion;
+
   g_object_class_install_property (gobject_class,
PROP_LABEL,
g_param_spec_string ("label",
@@ -151,6 +167,11 @@ thunar_shortcut_group_init (ThunarShortcutGroup *group)
   group->shortcuts = gtk_vbox_new (TRUE, 0);
   gtk_container_add (GTK_CONTAINER (group->expander), group->shortcuts);
   gtk_widget_show (group->shortcuts);
+
+  /* set the group up as a drop site to allow shortcuts to be re-ordered by 
DND */
+  gtk_drag_dest_set (GTK_WIDGET (group), 0,
+ drop_targets, G_N_ELEMENTS (drop_targets),
+ GDK_ACTION_MOVE);
 }
 
 
@@ -247,6 +268,27 @@ thun

[Xfce4-commits] Drop the cancellable in ThunarShortcut. Hide as soon as ejected.

2011-12-11 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to ffe9390edb86f1a448b4080f523d3ab6979df363 (commit)
   from 291b63199b6c50bf7db471bbb280c29a7818f335 (commit)

commit ffe9390edb86f1a448b4080f523d3ab6979df363
Author: Jannis Pohlmann 
Date:   Sun Dec 11 16:43:14 2011 +0100

Drop the cancellable in ThunarShortcut. Hide as soon as ejected.

Cancelling operations is very hard to get right, so we will not
implement it for now. We didn't support it before, so this is no
regression.

Make the action button insensitive whenever it is spinning.

Hide the shortcut as soon as ejecting was successful to avoid users
clicking on a shortcut for a no-longer-present mount or volume.

 thunar/thunar-shortcut.c |  169 +++---
 1 files changed, 84 insertions(+), 85 deletions(-)

diff --git a/thunar/thunar-shortcut.c b/thunar/thunar-shortcut.c
index a90b5f1..a46e59b 100644
--- a/thunar/thunar-shortcut.c
+++ b/thunar/thunar-shortcut.c
@@ -147,8 +147,10 @@ static void  thunar_shortcut_button_state_changed  
  (ThunarShortcut
   GtkWidget
  *button);
 static void  thunar_shortcut_button_clicked  (ThunarShortcut   
  *shortcut,
   GtkButton
  *button);
+#if 0
 static gboolean  thunar_shortcut_matches_types   (ThunarShortcut   
  *shortcut,
   
ThunarShortcutType  types);
+#endif
 static void  thunar_shortcut_update  (ThunarShortcut   
  *shortcut);
 static void  thunar_shortcut_location_changed(ThunarShortcut   
  *shortcut);
 static void  thunar_shortcut_file_changed(ThunarShortcut   
  *shortcut);
@@ -234,8 +236,6 @@ struct _ThunarShortcut
 
   ThunarShortcutState state;
 
-  GCancellable   *cancellable;
-
   guint   drag_highlight : 1;
   guint   drop_occurred : 1;
   guint   drop_data_ready : 1;
@@ -441,9 +441,6 @@ thunar_shortcut_init (ThunarShortcut *shortcut)
 {
   GtkWidget *box;
 
-  /* create a cancellable for aborting mount/unmount operations */
-  shortcut->cancellable = g_cancellable_new ();
-
   /* set the shortcut state to normal */
   shortcut->state = THUNAR_SHORTCUT_STATE_NORMAL;
 
@@ -548,10 +545,6 @@ thunar_shortcut_finalize (GObject *object)
   g_object_unref (shortcut->spinner);
   g_object_unref (shortcut->action_image);
 
-  /* release the cancellable */
-  g_cancellable_cancel (shortcut->cancellable);
-  g_object_unref (shortcut->cancellable);
-
   /* release the preferences */
   g_object_unref (shortcut->preferences);
 
@@ -1307,22 +1300,15 @@ thunar_shortcut_button_clicked (ThunarShortcut 
*shortcut,
 {
   _thunar_return_if_fail (THUNAR_IS_SHORTCUT (shortcut));
 
-  /* check if we are currently mounting/ejecting something */
-  if (shortcut->state != THUNAR_SHORTCUT_STATE_NORMAL)
-{
-  /* abort the mount/eject process */
-  g_cancellable_cancel (shortcut->cancellable);
-
-  /* we're done, no further processing please */
-  return;
-}
-
-  /* disconnect the shortcut */
-  thunar_shortcut_disconnect (shortcut);
+  /* disconnect the shortcut if we are not busy resolving, mounting,
+   * unmounting, or ejecting */
+  if (shortcut->state == THUNAR_SHORTCUT_STATE_NORMAL)
+thunar_shortcut_disconnect (shortcut);
 }
 
 
 
+#if 0
 static gboolean
 thunar_shortcut_matches_types (ThunarShortcut*shortcut,
ThunarShortcutType types)
@@ -1330,6 +1316,7 @@ thunar_shortcut_matches_types (ThunarShortcut
*shortcut,
   _thunar_return_val_if_fail (THUNAR_IS_SHORTCUT (shortcut), FALSE);
   return (shortcut->type & types) != 0;
 }
+#endif
 
 
 
@@ -1344,12 +1331,6 @@ thunar_shortcut_update (ThunarShortcut *shortcut)
 
   _thunar_return_if_fail (THUNAR_IS_SHORTCUT (shortcut));
 
-#if 0
-  thunar_shortcut_update_icon (shortcut);
-  thunar_shortcut_update_label (shortcut);
-  thunar_shortcut_update_button (shortcut);
-#endif
-
   switch (shortcut->type)
 {
 case THUNAR_SHORTCUT_REGULAR_FILE:
@@ -1367,6 +1348,12 @@ thunar_shortcut_update (ThunarShortcut *shortcut)
   /* update the icon of the shortcut */
   icon = thunar_file_get_icon (shortcut->file);
   thunar_shortcut_set_icon (shortcut, icon);
+
+  if (thunar_file_get_kind (shortcut->file) == G_FILE_TYPE_MOUNTABLE)
+{
+  g_debug ("%s is mountable",
+   display_name);
+}
 }
   else if (shortcut->location != NULL)
 {
@@ -1419,6 +1406,17 @@ thunar_shortcut_update (ThunarShortcut *shortcut)
 {
   gtk_widget_set_visible (shortcut->action_button, FALSE);
 }
+
+  

[Xfce4-commits] Fix a memory leak and a potential segfault in ThunarBrowser.

2011-12-11 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 291b63199b6c50bf7db471bbb280c29a7818f335 (commit)
   from f61f14f75dc4a84c8a65c9b38d0135b9b7f160d6 (commit)

commit 291b63199b6c50bf7db471bbb280c29a7818f335
Author: Jannis Pohlmann 
Date:   Sun Dec 11 16:42:48 2011 +0100

Fix a memory leak and a potential segfault in ThunarBrowser.

 thunar/thunar-browser.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/thunar/thunar-browser.c b/thunar/thunar-browser.c
index d70a9de..dc818a8 100644
--- a/thunar/thunar-browser.c
+++ b/thunar/thunar-browser.c
@@ -1,6 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009 Jannis Pohlmann 
+ * Copyright (c) 2009-2011 Jannis Pohlmann 
  *
  * This program is free software; you can redistribute it and/or 
  * modify it under the terms of the GNU General Public License as
@@ -298,6 +298,8 @@ thunar_browser_poke_mountable_finish (GObject  *object,
 
   thunar_browser_poke_file_data_free (poke_data);
 }
+
+  g_clear_error (&error);
 }
 
 
@@ -594,8 +596,6 @@ thunar_browser_poke_volume_finish (GObject  *object,
   if (error->code == G_IO_ERROR_ALREADY_MOUNTED)
 g_clear_error (&error);
 }
-
-  thunar_browser_poke_volume_data_free (poke_data);
 }
 
   if (error == NULL)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Open shortcuts on button release, handle middle click.

2011-12-09 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to f61f14f75dc4a84c8a65c9b38d0135b9b7f160d6 (commit)
   from cf2b167f0cc2cb52e7bc6aa5ca7e821d88f365b0 (commit)

commit f61f14f75dc4a84c8a65c9b38d0135b9b7f160d6
Author: Jannis Pohlmann 
Date:   Fri Dec 9 23:26:27 2011 +0100

Open shortcuts on button release, handle middle click.

 thunar/thunar-shortcut.c |   62 +++--
 1 files changed, 37 insertions(+), 25 deletions(-)

diff --git a/thunar/thunar-shortcut.c b/thunar/thunar-shortcut.c
index 280b636..a90b5f1 100644
--- a/thunar/thunar-shortcut.c
+++ b/thunar/thunar-shortcut.c
@@ -232,6 +232,8 @@ struct _ThunarShortcut
   ThunarPreferences  *preferences;
   ThunarIconSize  icon_size;
 
+  ThunarShortcutState state;
+
   GCancellable   *cancellable;
 
   guint   drag_highlight : 1;
@@ -239,7 +241,7 @@ struct _ThunarShortcut
   guint   drop_data_ready : 1;
   GList  *drop_file_list;
 
-  ThunarShortcutState state;
+  gintpressed_button;
 };
 
 
@@ -738,10 +740,19 @@ static gboolean
 thunar_shortcut_button_press_event (GtkWidget  *widget,
 GdkEventButton *event)
 {
-  GtkStateType state;
+  ThunarShortcut *shortcut = THUNAR_SHORTCUT (widget);
+  GtkStateTypestate;
+  gbooleanresult = FALSE;
 
   _thunar_return_val_if_fail (THUNAR_IS_SHORTCUT (widget), FALSE);
 
+  /* reset the pressed button state */
+  shortcut->pressed_button = -1;
+
+  /* ignore double click events */
+  if (event->type == GDK_2BUTTON_PRESS)
+return TRUE;
+
   /* determine the widget's state */
   state = gtk_widget_get_state (widget);
 
@@ -756,25 +767,23 @@ thunar_shortcut_button_press_event (GtkWidget  
*widget,
   gtk_widget_grab_focus (widget);
 }
 
-  /* distinguish between left, right and middle click */
-  if (event->button == 1)
+  if ((event->button == 1 || event->button == 2)
+  && (event->state & GDK_CONTROL_MASK) == 0)
 {
-  /* resolve (e.g. mount) the shortcut and activate it */
-  if (gtk_widget_get_state (widget) == GTK_STATE_SELECTED)
-thunar_shortcut_resolve_and_activate (THUNAR_SHORTCUT (widget), FALSE);
+  /* first or second mouse button pressed, handle this in the
+   * button release handler */
+  shortcut->pressed_button = event->button;
 }
   else if (event->button == 3)
 {
   /* emit the context menu signal */
-  g_signal_emit (widget, SIGNAL_CONTEXT_MENU, 0);
-}
-  else if (event->button == 2)
-{
-  /* TODO we don't handle middle-click events yet */
-  g_debug ("middle button press");
+  g_signal_emit (shortcut, shortcut_signals[SIGNAL_CONTEXT_MENU], 0);
+
+  /* we handled the event */
+  result = TRUE;
 }
 
-  return TRUE;
+  return result;
 }
 
 
@@ -783,23 +792,26 @@ static gboolean
 thunar_shortcut_button_release_event (GtkWidget  *widget,
   GdkEventButton *event)
 {
+  ThunarShortcut *shortcut = THUNAR_SHORTCUT (widget);
+
   _thunar_return_val_if_fail (THUNAR_IS_SHORTCUT (widget), FALSE);
 
-  /* distinguish between left, right and middle-click */
-  if (event->button == 3)
+  /* check whether we have an event matching the pressed button */
+  if (shortcut->pressed_button == (gint) event->button)
 {
-  /* TODO abort the menu popup timeout created in reaction to 
-   * the right button press event */
-
-  /* emit the popup-menu signal */
-  g_signal_emit_by_name (widget, "context-menu");
+  /* open in the same window on left click, in a new window on middle 
click */
+  if (event->button == 1)
+thunar_shortcut_resolve_and_activate (shortcut, FALSE);
+  else if (event->button == 2)
+thunar_shortcut_resolve_and_activate (shortcut, TRUE);
 
   return TRUE;
 }
-  else
-{
-  return FALSE;
-}
+
+  /* reset the pressd button state */
+  shortcut->pressed_button = -1;
+
+  return FALSE;
 }
 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] ThunarShortcut: rework internal state tracking, finish DND for files.

2011-12-09 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to cf2b167f0cc2cb52e7bc6aa5ca7e821d88f365b0 (commit)
   from 5fabb32bbedcd2bedbcc3eede6c039a225659937 (commit)

commit cf2b167f0cc2cb52e7bc6aa5ca7e821d88f365b0
Author: Jannis Pohlmann 
Date:   Fri Dec 9 19:29:36 2011 +0100

ThunarShortcut: rework internal state tracking, finish DND for files.

We'll skip mounting volumes on-demand when performing DND for now. We'll
also not wait until resolving is finished because this is tricky. The
way it behaves now is consistent with previous versions of thunar: don't
accept drops to stuff that is not mounted or resolved yet.

 thunar/thunar-shortcut.c |  466 +++---
 1 files changed, 272 insertions(+), 194 deletions(-)

diff --git a/thunar/thunar-shortcut.c b/thunar/thunar-shortcut.c
index 12ed3e2..280b636 100644
--- a/thunar/thunar-shortcut.c
+++ b/thunar/thunar-shortcut.c
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -148,6 +149,7 @@ static void  thunar_shortcut_button_clicked 
 (ThunarShortcut
   GtkButton
  *button);
 static gboolean  thunar_shortcut_matches_types   (ThunarShortcut   
  *shortcut,
   
ThunarShortcutType  types);
+static void  thunar_shortcut_update  (ThunarShortcut   
  *shortcut);
 static void  thunar_shortcut_location_changed(ThunarShortcut   
  *shortcut);
 static void  thunar_shortcut_file_changed(ThunarShortcut   
  *shortcut);
 static void  thunar_shortcut_shortcut_type_changed   (ThunarShortcut   
  *shortcut);
@@ -812,6 +814,9 @@ thunar_shortcut_drag_data_received (GtkWidget
*widget,
 guint timestamp)
 {
   ThunarShortcut *shortcut = THUNAR_SHORTCUT (widget);
+  GdkDragAction   actions;
+  GdkDragAction   action;
+  gbooleansuccess = FALSE;
 
   _thunar_return_if_fail (THUNAR_IS_SHORTCUT (widget));
   _thunar_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
@@ -841,19 +846,45 @@ thunar_shortcut_drag_data_received (GtkWidget
*widget,
   /* make sure we only handle text/uri-list */
   if (info == TARGET_TEXT_URI_LIST)
 {
-  if (shortcut->drop_file_list != NULL)
-g_debug ("  have drop files, create bookmarks now");
-  else
-g_debug ("  don't have drop files, abort drag and drop");
-}
+  if (shortcut->file != NULL)
+{
+  /* determine the drop actions */
+  actions = thunar_shortcut_compute_drop_actions (shortcut, 
context, 
+  &action);
+
+  /* check whether the actions are supported */
+  if ((actions & (GDK_ACTION_COPY
+  | GDK_ACTION_MOVE 
+  | GDK_ACTION_LINK)) != 0)
+{
+  /* if necessary, ask the user what he wants to do */
+  if (action == GDK_ACTION_ASK)
+{
+  action = thunar_dnd_ask (widget,
+   shortcut->file,
+   shortcut->drop_file_list,
+   timestamp,
+   actions);
+}
+
+  /* if we have a drop action, perform it now */
+  if (action != 0)
+{
+  success = thunar_dnd_perform (widget,
+shortcut->file,
+shortcut->drop_file_list,
+action,
+NULL);
+}
+}
+}
 
-  /* disable highlighting and release the drag data */
-  /* TODO we might have to delay this until the shortcut has been resolved 
*/
-  thunar_shortcut_drag_leave (widget, context, timestamp);
+  /* disable highlighting and release the drag data */
+  thunar_shortcut_drag_leave (widget, context, timestamp);
 
-  /* tell the peer that we handled the copy */
-  /* TODO we might have to delay this until the shortcut has been resolved 
*/
-  gtk_drag_finish (context, shortcut->drop_file_list != NULL, FALSE, 
timestamp);
+  /* tell the peer that we handled the copy */
+  gtk_drag_finish (context, success, FALSE, timestamp);
+}
 }
   else
 {
@@ -885,7 +916,7 @@ thunar_shortcut_drag_drop (GtkWidget  *widget,

[Xfce4-commits] Remove debug output from ThunarBrowser.

2011-12-09 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 5fabb32bbedcd2bedbcc3eede6c039a225659937 (commit)
   from e53fec6e8cc0133278b7a2a9628ef0bed22e5451 (commit)

commit 5fabb32bbedcd2bedbcc3eede6c039a225659937
Author: Jannis Pohlmann 
Date:   Fri Dec 9 19:28:05 2011 +0100

Remove debug output from ThunarBrowser.

 thunar/thunar-browser.c |   34 --
 1 files changed, 0 insertions(+), 34 deletions(-)

diff --git a/thunar/thunar-browser.c b/thunar/thunar-browser.c
index d692189..d70a9de 100644
--- a/thunar/thunar-browser.c
+++ b/thunar/thunar-browser.c
@@ -219,8 +219,6 @@ thunar_browser_poke_mountable_file_finish (GFile  
*location,
   _thunar_return_if_fail (THUNAR_IS_FILE (poke_data->file));
   _thunar_return_if_fail (THUNAR_IS_FILE (poke_data->source));
 
-  g_debug ("thunar_browser_poke_mountable_file_finish");
-
   if (poke_data->location_func != NULL)
 {
   (poke_data->location_func) (poke_data->browser,
@@ -257,8 +255,6 @@ thunar_browser_poke_mountable_finish (GObject  *object,
   _thunar_return_if_fail (THUNAR_IS_BROWSER (poke_data->browser));
   _thunar_return_if_fail (THUNAR_IS_FILE (poke_data->file));
 
-  g_debug ("thunar_browser_poke_mountable_finish");
-
   if (!g_file_mount_mountable_finish (G_FILE (object), result, &error))
 {
   if (error->domain == G_IO_ERROR)
@@ -320,8 +316,6 @@ thunar_browser_poke_file_finish (GObject  *object,
   _thunar_return_if_fail (THUNAR_IS_BROWSER (poke_data->browser));
   _thunar_return_if_fail (THUNAR_IS_FILE (poke_data->file));
 
-  g_debug ("thunar_browser_poke_file_finish");
-
   if (!g_file_mount_enclosing_volume_finish (G_FILE (object), result, &error))
 {
   if (error->domain == G_IO_ERROR)
@@ -390,8 +384,6 @@ thunar_browser_poke_shortcut_file_finish (GFile *location,
   _thunar_return_if_fail (THUNAR_IS_BROWSER (poke_data->browser));
   _thunar_return_if_fail (THUNAR_IS_FILE (poke_data->file));
 
-  g_debug ("thunar_browser_poke_shortcut_file_finish");
-
   if (error == NULL)
 {
   thunar_browser_poke_file_internal (poke_data->browser,
@@ -446,12 +438,8 @@ thunar_browser_poke_file_internal (ThunarBrowser   
 *browser,
   _thunar_return_if_fail (THUNAR_IS_FILE (source));
   _thunar_return_if_fail (THUNAR_IS_FILE (file));
 
-  g_debug ("thunar_browser_poke_file_internal");
-
   if (thunar_file_get_kind (file) == G_FILE_TYPE_SHORTCUT)
 {
-  g_debug ("  is shortcut");
-
   target = thunar_file_get_target_location (file);
 
   poke_data = thunar_browser_poke_file_data_new (browser, location, source,
@@ -465,12 +453,8 @@ thunar_browser_poke_file_internal (ThunarBrowser   
 *browser,
 }
   else if (thunar_file_get_kind (file) == G_FILE_TYPE_MOUNTABLE)
 {
-  g_debug ("  is mountable");
-
   if (thunar_file_is_mounted (file))
 {
-  g_debug ("  is mounted");
-
   target = thunar_file_get_target_location (file);
 
   poke_data = thunar_browser_poke_file_data_new (browser, location, 
source,
@@ -484,8 +468,6 @@ thunar_browser_poke_file_internal (ThunarBrowser
*browser,
 }
   else
 {
-  g_debug ("  is not mounted yet");
-
   poke_data = thunar_browser_poke_file_data_new (browser, location, 
source,
  file, func, NULL, 
user_data);
 
@@ -501,8 +483,6 @@ thunar_browser_poke_file_internal (ThunarBrowser
*browser,
 }
   else if (!thunar_file_is_mounted (file))
 {
-  g_debug ("  is file, not mounted yet");
-
   poke_data = thunar_browser_poke_file_data_new (browser, location, source,
  file, func, NULL, 
user_data);
 
@@ -517,8 +497,6 @@ thunar_browser_poke_file_internal (ThunarBrowser
*browser,
 }
   else
 {
-  g_debug ("  is file, already mounted and loaded");
-
   if (location_func != NULL)
 location_func (browser, location, source, file, NULL, user_data);
 
@@ -562,8 +540,6 @@ thunar_browser_poke_file (ThunarBrowser*browser,
   _thunar_return_if_fail (THUNAR_IS_BROWSER (browser));
   _thunar_return_if_fail (THUNAR_IS_FILE (file));
 
-  g_debug ("thunar_browser_poke_file");
-
   thunar_browser_poke_file_internal (browser, file->gfile, file, file, widget,
  func, NULL, user_data);
 }
@@ -583,8 +559,6 @@ thunar_browser_poke_volume_file_finish (GFile  
*location,
   _thunar_return_if_fail (THUNAR_IS_BROWSER (poke_data->browser));
   _thunar_return_if_fail (G_IS_VOLUME (poke_data->volume));
 
-  g_debug ("thunar_browser_poke_volume_file_finish");
-
   if (poke_data->func != NULL)
 {
   (poke_data-&g

[Xfce4-commits] Fix a typo that would lead to not adding new shortcuts.

2011-12-09 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to e53fec6e8cc0133278b7a2a9628ef0bed22e5451 (commit)
   from f6f91378b09c350752caa2cf2454f5b506fa3b28 (commit)

commit e53fec6e8cc0133278b7a2a9628ef0bed22e5451
Author: Jannis Pohlmann 
Date:   Fri Dec 9 19:20:54 2011 +0100

Fix a typo that would lead to not adding new shortcuts.

 thunar/thunar-shortcuts-view.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/thunar/thunar-shortcuts-view.c b/thunar/thunar-shortcuts-view.c
index eae6082..6990072 100644
--- a/thunar/thunar-shortcuts-view.c
+++ b/thunar/thunar-shortcuts-view.c
@@ -806,7 +806,7 @@ thunar_shortcuts_view_mount_added (ThunarShortcutsView 
*view,
   /* skip gphoto2 mounts as those are always associated with a volume,
* only add a new shortcut if we have none for the mount point yet */
   if (!g_file_has_uri_scheme (location, "gphoto2") 
-  && thunar_shortcuts_view_has_location (view, location))
+  && !thunar_shortcuts_view_has_location (view, location))
 {
   /* create an eject icon */
   eject_icon = g_themed_icon_new ("media-eject");
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Squashme: Initial work on DND in ThunarShortcut.

2011-12-08 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to f6f91378b09c350752caa2cf2454f5b506fa3b28 (commit)
   from 92ff6996ea58f5f772164f803c19978eb82ad54c (commit)

commit f6f91378b09c350752caa2cf2454f5b506fa3b28
Author: Jannis Pohlmann 
Date:   Fri Dec 9 02:46:22 2011 +0100

Squashme: Initial work on DND in ThunarShortcut.

Already implemented is the typical DND data negotiation code. Shortcuts
with a ThunarFile already compute and suggest possible drop actions back
to GDK.

What is missing is the same for not-yet-mounted volumes, mounted
volumes and mounts. Not-yet-mounted volumes and basically everything
that has not finished resolving need to suggest all possible actions.
Mounted volumes and mounts need to properly set the ThunarFile
independently of the DND changes.

We might have to delay asking what to do, performing the drop action,
and calling drag_leave until resolving has finished after a drop. This
might be tricky as the DND callbacks are synchronous. In any case, care
needs to be taken of not destroying the drop file list too early when
delaying the actual drop action.

 thunar/thunar-shortcut.c |  436 +
 1 files changed, 358 insertions(+), 78 deletions(-)

diff --git a/thunar/thunar-shortcut.c b/thunar/thunar-shortcut.c
index 80f49d9..12ed3e2 100644
--- a/thunar/thunar-shortcut.c
+++ b/thunar/thunar-shortcut.c
@@ -74,6 +74,12 @@ enum
   LAST_SIGNAL,
 };
 
+/* identifiers for DnD target types */
+enum
+{
+  TARGET_TEXT_URI_LIST,
+};
+
 /* row states */
 typedef enum
 {
@@ -84,81 +90,104 @@ typedef enum
 
 
 
-static void thunar_shortcut_constructed (GObject   
 *object);
-static void thunar_shortcut_finalize(GObject   
 *object);
-static void thunar_shortcut_get_property(GObject   
 *object,
- guint 
  prop_id,
- GValue
 *value,
- GParamSpec
 *pspec);
-static void thunar_shortcut_set_property(GObject   
 *object,
- guint 
  prop_id,
- const GValue  
 *value,
- GParamSpec
 *pspec);
-static gboolean thunar_shortcut_button_press_event  (GtkWidget 
 *widget,
- GdkEventButton
 *event);
-static gboolean thunar_shortcut_button_release_event(GtkWidget 
 *widget,
- GdkEventButton
 *event);
-static gboolean thunar_shortcut_key_press_event (GtkWidget 
 *widget,
- GdkEventKey   
 *event);
-static gboolean thunar_shortcut_enter_notify_event  (GtkWidget 
 *widget,
- GdkEventCrossing  
 *event);
-static gboolean thunar_shortcut_leave_notify_event  (GtkWidget 
 *widget,
- GdkEventCrossing  
 *event);
-static gboolean thunar_shortcut_expose_event(GtkWidget 
 *widget,
- GdkEventExpose
 *event);
-static gboolean thunar_shortcut_focus   (GtkWidget 
 *widget,
- GtkDirectionType  
  direction);
-static gboolean thunar_shortcut_focus_in_event  (GtkWidget 
 *widget,
- GdkEventFocus 
 *event);
-static void thunar_shortcut_size_request(GtkWidget 
 *widget,
- GtkRequisition
 *requisition);
-static void thunar_shortcut_button_state_changed(ThunarShortcut
 *shortcut,
- GtkStateType  
  previous_state,
- GtkWidget 
 *button);
-static void thunar_shortcut_button_clicked  (ThunarShortcut
 *shortcut,
- GtkButton 
 *button);
-static gboolean thunar_shortcut_matches_types   (ThunarShortcut
 *shortcut,
- 
ThunarShortcutType  types);
-static void thunar_shortcut_location_changed(ThunarShortcut
 *shortcut);
-static void

[Xfce4-commits] Do not make icon names translatable.

2011-12-03 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to e74388e73c1f0e1fd4806d17c06c0a10e330c168 (commit)
   from 9ed39845464e50104534310aee07eba7073afe24 (commit)

commit e74388e73c1f0e1fd4806d17c06c0a10e330c168
Author: Jannis Pohlmann 
Date:   Sat Dec 3 14:41:39 2011 +0100

Do not make icon names translatable.

 thunar-volman/tvm-input-device.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/thunar-volman/tvm-input-device.c b/thunar-volman/tvm-input-device.c
index 6280b6b..71af8ac 100644
--- a/thunar-volman/tvm-input-device.c
+++ b/thunar-volman/tvm-input-device.c
@@ -71,7 +71,7 @@ tvm_input_device_added (TvmContext *context)
   enabled_property = "/autokeyboard/enabled";
   command_property = "/autokeyboard/command";
 
-  icon = _("input-keyboard");
+  icon = "input-keyboard";
   summary = _("Keyboard detected");
   message = _("A keyboard was detected");
 }
@@ -83,7 +83,7 @@ tvm_input_device_added (TvmContext *context)
   enabled_property = "/autotablet/enabled";
   command_property = "/autotablet/command";
 
-  icon = _("input-tablet");
+  icon = "input-tablet";
   summary = _("Tablet detected");
   message = _("A graphics tablet was detected");
 }
@@ -97,7 +97,7 @@ tvm_input_device_added (TvmContext *context)
   enabled_property = "/autotablet/enabled";
   command_property = "/autotablet/command";
 
-  icon = _("input-tablet");
+  icon = "input-tablet";
   summary = _("Tablet detected");
   message = _("A graphics tablet was detected");
 }
@@ -107,7 +107,7 @@ tvm_input_device_added (TvmContext *context)
   enabled_property = "/automouse/enabled";
   command_property = "/automouse/command";
 
-  icon = _("input-mouse");
+  icon = "input-mouse";
   summary = _("Mouse detected");
   message = _("A mouse was detected");
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Initial work on gphoto2 and detecting linked mounts/volumes.

2011-11-24 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 92ff6996ea58f5f772164f803c19978eb82ad54c (commit)
   from 7f5f9814d999ad873d451cf605476f3020ed73f1 (commit)

commit 92ff6996ea58f5f772164f803c19978eb82ad54c
Author: Jannis Pohlmann 
Date:   Fri Nov 25 02:07:17 2011 +

Initial work on gphoto2 and detecting linked mounts/volumes.

 thunar/thunar-enum-types.c |1 +
 thunar/thunar-enum-types.h |1 +
 thunar/thunar-shortcut-group.c |   23 --
 thunar/thunar-shortcut-group.h |   43 ++-
 thunar/thunar-shortcut.c   |   90 +++
 thunar/thunar-shortcut.h   |2 +
 thunar/thunar-shortcuts-view.c |   89 ---
 thunar/thunar-shortcuts-view.h |2 +
 8 files changed, 182 insertions(+), 69 deletions(-)

diff --git a/thunar/thunar-enum-types.c b/thunar/thunar-enum-types.c
index 6893656..374d25c 100644
--- a/thunar/thunar-enum-types.c
+++ b/thunar/thunar-enum-types.c
@@ -350,6 +350,7 @@ thunar_shortcut_type_get_type (void)
 { THUNAR_SHORTCUT_REGULAR_MOUNT,"THUNAR_SHORTCUT_REGULAR_MOUNT",   
 "regular-mount",},
 { THUNAR_SHORTCUT_ARCHIVE_MOUNT,"THUNAR_SHORTCUT_ARCHIVE_MOUNT",   
 "archive-mount",},
 { THUNAR_SHORTCUT_NETWORK_MOUNT,"THUNAR_SHORTCUT_NETWORK_MOUNT",   
 "network-mount",},
+{ THUNAR_SHORTCUT_DEVICE_MOUNT, "THUNAR_SHORTCUT_DEVICE_MOUNT",
 "device-mount", },
 { 0,NULL,  
 NULL,   },
   };
 
diff --git a/thunar/thunar-enum-types.h b/thunar/thunar-enum-types.h
index 609de31..68b1f5c 100644
--- a/thunar/thunar-enum-types.h
+++ b/thunar/thunar-enum-types.h
@@ -309,6 +309,7 @@ typedef enum
   THUNAR_SHORTCUT_REGULAR_MOUNT= 1 << 5,
   THUNAR_SHORTCUT_ARCHIVE_MOUNT= 1 << 6,
   THUNAR_SHORTCUT_NETWORK_MOUNT= 1 << 7,
+  THUNAR_SHORTCUT_DEVICE_MOUNT = 1 << 8,
 } ThunarShortcutType;
 
 GType thunar_shortcut_type_get_type (void) G_GNUC_CONST;
diff --git a/thunar/thunar-shortcut-group.c b/thunar/thunar-shortcut-group.c
index 68d8965..258877a 100644
--- a/thunar/thunar-shortcut-group.c
+++ b/thunar/thunar-shortcut-group.c
@@ -591,13 +591,26 @@ thunar_shortcut_group_find_shortcut_by_file 
(ThunarShortcutGroup *group,
  ThunarFile  *file,
  ThunarShortcut **result)
 {
+  _thunar_return_val_if_fail (THUNAR_IS_SHORTCUT_GROUP (group), FALSE);
+  _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE);
+
+  return thunar_shortcut_group_find_shortcut_by_location (group, file->gfile, 
result);
+}
+
+
+
+gboolean
+thunar_shortcut_group_find_shortcut_by_location (ThunarShortcutGroup *group,
+ GFile   *location,
+ ThunarShortcut **result)
+{
   ThunarShortcut *shortcut;
-  gboolean has_shortcut = FALSE;
-  GList   *children;
-  GList   *iter;
+  gbooleanhas_shortcut = FALSE;
+  GList  *children;
+  GList  *iter;
 
   _thunar_return_val_if_fail (THUNAR_IS_SHORTCUT_GROUP (group), FALSE);
-  _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE);
+  _thunar_return_val_if_fail (G_IS_FILE (location), FALSE);
 
   children = gtk_container_get_children (GTK_CONTAINER (group->shortcuts));
 
@@ -608,7 +621,7 @@ thunar_shortcut_group_find_shortcut_by_file 
(ThunarShortcutGroup *group,
 {
   shortcut = THUNAR_SHORTCUT (iter->data);
 
-  if (thunar_shortcut_matches_file (shortcut, file))
+  if (thunar_shortcut_matches_location (shortcut, location))
 {
   if (result != NULL)
 *result = shortcut;
diff --git a/thunar/thunar-shortcut-group.h b/thunar/thunar-shortcut-group.h
index eed1d66..b21bcc6 100644
--- a/thunar/thunar-shortcut-group.h
+++ b/thunar/thunar-shortcut-group.h
@@ -37,27 +37,30 @@ typedef struct _ThunarShortcutGroupPrivate 
ThunarShortcutGroupPrivate;
 typedef struct _ThunarShortcutGroupClass   ThunarShortcutGroupClass;
 typedef struct _ThunarShortcutGroupThunarShortcutGroup;
 
-GType  thunar_shortcut_group_get_type   (void) G_GNUC_CONST;
+GType  thunar_shortcut_group_get_type  (void) G_GNUC_CONST;
 
-GtkWidget *thunar_shortcut_group_new(const gchar 
*label,
- ThunarShortcutType   
accepted_types);
-gboolean   thunar_shortcut_group_try_add_shortcut   (ThunarShortcutGroup 
*group,
- ThunarShortcut  
*shortcut);
-void   thunar_shortcut_group_unselect_shortcuts (ThunarShortcutGroup 
*group,
-

[Xfce4-commits] Don't select the entry if only "l" is pressed.

2011-11-22 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to aa65c1a466584fb83150ec0321c3b319f639a9f4 (commit)
   from 3ffdc528b5d8b13fa1923772040065ba31b66b4b (commit)

commit aa65c1a466584fb83150ec0321c3b319f639a9f4
Author: Jannis Pohlmann 
Date:   Tue Nov 22 19:06:18 2011 +

Don't select the entry if only "l" is pressed.

The bit-and operation was actually a boolean and operation here.

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

diff --git a/src/appfinder-window.c b/src/appfinder-window.c
index 382f155..351b4d2 100644
--- a/src/appfinder-window.c
+++ b/src/appfinder-window.c
@@ -435,7 +435,7 @@ xfce_appfinder_window_key_press_event (GtkWidget   *widget,
   return TRUE;
 }
   else if (event->keyval == GDK_l
-   && (event->state && GDK_CONTROL_MASK) != 0)
+   && (event->state & GDK_CONTROL_MASK) != 0)
 {
   entry = XFCE_APPFINDER_WINDOW (widget)->entry;
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix the indentation offset in ThunarShortcutGroup.

2011-11-18 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to c9cb2abc422806feb521eaa474662a76dbdbae23 (commit)
   from 37bc2b962d2dc834e8ad34853f7a0ba7d15adb49 (commit)

commit c9cb2abc422806feb521eaa474662a76dbdbae23
Author: Jannis Pohlmann 
Date:   Fri Nov 18 11:10:37 2011 +

Fix the indentation offset in ThunarShortcutGroup.

 thunar/thunar-shortcut-group.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/thunar/thunar-shortcut-group.c b/thunar/thunar-shortcut-group.c
index ee8e16b..56ce8b1 100644
--- a/thunar/thunar-shortcut-group.c
+++ b/thunar/thunar-shortcut-group.c
@@ -359,7 +359,7 @@ thunar_shortcut_group_apply_indentation 
(ThunarShortcutGroup *group,
 
   /* apply the indentation to the shortcut alignment */
   alignment = thunar_shortcut_get_alignment (shortcut);
-  g_object_set (alignment, "left-padding", expander_size + expander_spacing * 
2 + 1, NULL);
+  g_object_set (alignment, "left-padding", expander_size + expander_spacing * 
2 + 2, NULL);
 }
 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Properly align ThunarShortcut contents with group titles.

2011-11-17 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 37bc2b962d2dc834e8ad34853f7a0ba7d15adb49 (commit)
   from 1c82b51da2829aaba70f6bf289d77a12c11401e3 (commit)

commit 37bc2b962d2dc834e8ad34853f7a0ba7d15adb49
Author: Jannis Pohlmann 
Date:   Thu Nov 17 15:59:44 2011 +

Properly align ThunarShortcut contents with group titles.

 thunar/thunar-shortcut-group.c |   58 
 thunar/thunar-shortcut.c   |   22 ++-
 thunar/thunar-shortcut.h   |1 +
 3 files changed, 74 insertions(+), 7 deletions(-)

diff --git a/thunar/thunar-shortcut-group.c b/thunar/thunar-shortcut-group.c
index 9b23619..ee8e16b 100644
--- a/thunar/thunar-shortcut-group.c
+++ b/thunar/thunar-shortcut-group.c
@@ -61,6 +61,11 @@ static void thunar_shortcut_group_set_property  
(GObject
  GParamSpec
 *pspec);
 static void thunar_shortcut_group_attract_attention (ThunarShortcutGroup   
 *group);
 static gboolean thunar_shortcut_group_flash_expander(gpointer  
  user_data);
+static void thunar_shortcut_group_expand_style_set  (ThunarShortcutGroup   
 *group,
+ GtkStyle  
 *style,
+ GtkWidget 
 *expander);
+static void thunar_shortcut_group_apply_indentation (ThunarShortcutGroup   
 *group,
+ ThunarShortcut
 *shortcut);
 
 
 
@@ -138,6 +143,10 @@ thunar_shortcut_group_init (ThunarShortcutGroup *group)
   gtk_container_add (GTK_CONTAINER (group), group->expander);
   gtk_widget_show (group->expander);
 
+  g_signal_connect_swapped (group->expander, "style-set",
+G_CALLBACK 
(thunar_shortcut_group_expand_style_set),
+group);
+
   /* add a box for the individual shortcuts */
   group->shortcuts = gtk_vbox_new (TRUE, 0);
   gtk_container_add (GTK_CONTAINER (group->expander), group->shortcuts);
@@ -309,6 +318,52 @@ thunar_shortcut_group_flash_expander (gpointer user_data)
 
 
 
+static void
+thunar_shortcut_group_expand_style_set (ThunarShortcutGroup *group,
+GtkStyle*style,
+GtkWidget   *expander)
+{
+  GList *children;
+  GList *iter;
+
+  _thunar_return_if_fail (THUNAR_IS_SHORTCUT_GROUP (group));
+  _thunar_return_if_fail (GTK_IS_EXPANDER (expander));
+  _thunar_return_if_fail (expander == group->expander);
+  
+  children = gtk_container_get_children (GTK_CONTAINER (group->shortcuts));
+
+  for (iter = children; iter != NULL; iter = iter->next)
+thunar_shortcut_group_apply_indentation (group, THUNAR_SHORTCUT 
(iter->data));
+
+  g_list_free (children);
+}
+
+
+
+static void
+thunar_shortcut_group_apply_indentation (ThunarShortcutGroup *group,
+ ThunarShortcut  *shortcut)
+{
+  GtkWidget *alignment;
+  gint   expander_size;
+  gint   expander_spacing;
+
+  _thunar_return_if_fail (THUNAR_IS_SHORTCUT_GROUP (group));
+  _thunar_return_if_fail (THUNAR_IS_SHORTCUT (shortcut));
+
+  /* get information about the expander arrow size */
+  gtk_widget_style_get (group->expander,
+"expander-size", &expander_size,
+"expander-spacing", &expander_spacing,
+NULL);
+
+  /* apply the indentation to the shortcut alignment */
+  alignment = thunar_shortcut_get_alignment (shortcut);
+  g_object_set (alignment, "left-padding", expander_size + expander_spacing * 
2 + 1, NULL);
+}
+
+
+
 GtkWidget *
 thunar_shortcut_group_new (const gchar   *label,
ThunarShortcutType accepted_types)
@@ -341,6 +396,9 @@ thunar_shortcut_group_try_add_shortcut (ThunarShortcutGroup 
*group,
 
   /* TODO find the sorting, remembered or user-defined position for the 
shortcut */
 
+  /* properly align the shortcut contents with the group title */
+  thunar_shortcut_group_apply_indentation (group, shortcut);
+
   gtk_box_pack_start (GTK_BOX (group->shortcuts), GTK_WIDGET (shortcut), 
FALSE, TRUE, 0);
   gtk_widget_show (GTK_WIDGET (shortcut));
 
diff --git a/thunar/thunar-shortcut.c b/thunar/thunar-shortcut.c
index c13e51c..66fa959 100644
--- a/thunar/thunar-shortcut.c
+++ b/thunar/thunar-shortcut.c
@@ -191,6 +191,7 @@ struct _ThunarShortcut
   guint   persistent : 1;
   guint   constructed : 1;
 
+  GtkWidget  *alignment;
   GtkWidget  *label_widget;
   GtkWidget  *icon_image;
   GtkWidget  *action_button;
@@ -391,7 +392,6 @@ thunar_shortcut_class_init (ThunarShortcutClass *klass)
 static void
 thunar_shortcut_init (ThunarShortcut *shortcut)
 {
-  GtkWidget *a

[Xfce4-commits] Fix a guint64 format string.

2011-11-16 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 33e3d7e877910cd89934bf1738a7122eda3859c8 (commit)
   from 64e618af66b5f6df7907be7b84b56494937453fd (commit)

commit 33e3d7e877910cd89934bf1738a7122eda3859c8
Author: Jannis Pohlmann 
Date:   Wed Nov 16 12:31:43 2011 +

Fix a guint64 format string.

 src/properties_dialog.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/properties_dialog.c b/src/properties_dialog.c
index 0d29acc..dec05f6 100644
--- a/src/properties_dialog.c
+++ b/src/properties_dialog.c
@@ -476,7 +476,7 @@ properties_dialog_set_file (
 g_snprintf (
 buf,
 20,
-"%lu bytes",
+"%llu bytes",
 size);
 gtk_label_set_text (
 GTK_LABEL (dialog->priv->size_content_label),
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Drop AC_PROG_LIBTOOL for LT_PREREQ and LT_INIT.

2011-11-16 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to ede4fb5c803c867c10c6c0fa5f8bfa9ce19d210d (commit)
   from 855cf774c7270eda081e272facb3db1a2a65c213 (commit)

commit ede4fb5c803c867c10c6c0fa5f8bfa9ce19d210d
Author: Jannis Pohlmann 
Date:   Wed Nov 16 10:54:17 2011 +

Drop AC_PROG_LIBTOOL for LT_PREREQ and LT_INIT.

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

diff --git a/configure.ac.in b/configure.ac.in
index bf6a8ed..e0bc4db 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -47,9 +47,12 @@ dnl check for basic programs
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_INSTALL
-AC_PROG_LIBTOOL
 AC_PROG_INTLTOOL([intltool_minimum_version], [no-xml])
 
+dnl prepare libtool
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
+
 dnl check for standard header files
 AC_HEADER_STDC
 AC_CHECK_HEADERS([ctype.h errno.h fcntl.h math.h pwd.h signal.h stddef.h \
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Drop AC_PROG_LIBTOOL and AC_DISABLE_STATIC for LT_PREREQ and LT_INIT.

2011-11-16 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 3cb5f3823661bd62f6f4683eb01bdacb9a9b04ac (commit)
   from 3f61fa2653c511b2044353635497bf58365822c8 (commit)

commit 3cb5f3823661bd62f6f4683eb01bdacb9a9b04ac
Author: Jannis Pohlmann 
Date:   Wed Nov 16 10:36:25 2011 +

Drop AC_PROG_LIBTOOL and AC_DISABLE_STATIC for LT_PREREQ and LT_INIT.

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

diff --git a/configure.ac.in b/configure.ac.in
index 8aa7e8c..38f9675 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -68,14 +68,13 @@ AM_PROG_CC_C_O()
 AC_PROG_LD()
 AC_PROG_INSTALL()
 AC_PROG_INTLTOOL()
-AC_PROG_LIBTOOL()
+AC_CHECK_PROGS([PERL], [perl5 perl])
 
 dnl **
 dnl *** Initialize libtool ***
 dnl **
-AC_DISABLE_STATIC()
-AC_PROG_LIBTOOL()
-AC_CHECK_PROGS([PERL], [perl5 perl])
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
 
 dnl **
 dnl *** Substitute version information ***
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Drop AC_PROG_LIBTOOL/AC_DISABLE_STATIC for LT_PREREQ and LT_INIT.

2011-11-16 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to f5e0216b2bd1c8edcd110913178ccd18ed5808fd (commit)
   from 9df7cd97c6327fd2899c4f552ea71964bd875500 (commit)

commit f5e0216b2bd1c8edcd110913178ccd18ed5808fd
Author: Jannis Pohlmann 
Date:   Wed Nov 16 10:31:36 2011 +

Drop AC_PROG_LIBTOOL/AC_DISABLE_STATIC for LT_PREREQ and LT_INIT.

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

diff --git a/configure.in.in b/configure.in.in
index 5ea2d19..fe41005 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -1,7 +1,7 @@
 dnl $Id$
 dnl
 dnl Copyright (c) 2004-2007 Benedikt Meurer 
-dnl Copyright (c) 2010  Jannis Pohlmann 
+dnl Copyright (c) 2010-2011 Jannis Pohlmann 
 dnl
 dnl This program is free software; you can redistribute it and/or 
 dnl modify it under the terms of the GNU General Public License as
@@ -71,8 +71,8 @@ AC_PROG_INTLTOOL()
 dnl **
 dnl *** Initialize libtool ***
 dnl **
-AC_DISABLE_STATIC()
-AC_PROG_LIBTOOL()
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
 
 dnl **
 dnl *** Check for standard headers ***
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Drop AC_PROG_LIBTOOL in favor of LT_PREREQ and LT_INIT.

2011-11-16 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 18199db7428b4bd1a0c5aaa60ebdea3e96178006 (commit)
   from 9543eab4867876a6190cc07dba7b79fec7aab528 (commit)

commit 18199db7428b4bd1a0c5aaa60ebdea3e96178006
Author: Jannis Pohlmann 
Date:   Wed Nov 16 10:29:59 2011 +

Drop AC_PROG_LIBTOOL in favor of LT_PREREQ and LT_INIT.

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

diff --git a/configure.ac.in b/configure.ac.in
index afd56b5..ffcb1ce 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -53,7 +53,10 @@ AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_INSTALL
 AC_PROG_INTLTOOL([intltool_minimum_version], [no-xml])
-AC_PROG_LIBTOOL
+
+dnl check for libtool
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
 
 dnl Check C Compiler Characteristics
 AC_C_INLINE
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Drop AC_PROG_LIBTOOL for LT_PREREQ and LT_INIT.

2011-11-16 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 8f77ee1d71d82fa48a58ecd00ea9c979bba3fa00 (commit)
   from 4f57bbd2c55743dba076c50611409f605918d45f (commit)

commit 8f77ee1d71d82fa48a58ecd00ea9c979bba3fa00
Author: Jannis Pohlmann 
Date:   Wed Nov 16 10:16:04 2011 +

Drop AC_PROG_LIBTOOL for LT_PREREQ and LT_INIT.

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

diff --git a/configure.in.in b/configure.in.in
index 1d10454..e928453 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -52,7 +52,10 @@ AC_PROG_CC()
 AM_PROG_CC_C_O()
 AC_PROG_INSTALL()
 AC_PROG_INTLTOOL()
-AC_PROG_LIBTOOL()
+
+dnl check for libtool
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
 
 dnl check for standard header files
 AC_HEADER_STDC
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Drop AC_PROG_LIBTOOL in favor of LT_PREREQ and LT_INIT.

2011-11-16 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 7289c17fcb51c7ee3afcab49b886852dffef2365 (commit)
   from e64e0a54ded8539281681abbe416d4a83e7c03db (commit)

commit 7289c17fcb51c7ee3afcab49b886852dffef2365
Author: Jannis Pohlmann 
Date:   Wed Nov 16 10:08:18 2011 +

Drop AC_PROG_LIBTOOL in favor of LT_PREREQ and LT_INIT.

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

diff --git a/configure.ac b/configure.ac
index 468c2b6..7a172e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,7 +100,12 @@ AC_PROG_CC()
 AM_PROG_CC_C_O()
 AC_PROG_INSTALL()
 AC_PROG_INTLTOOL([0.31], [no-xml])
-AC_PROG_LIBTOOL()
+
+dnl ***
+dnl *** Prepare libtool ***
+dnl ***
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
 
 dnl ***
 dnl *** Check for standard header files ***
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Drop AC_LIBTOOL in favor of LT_PREREQ and LT_INIT.

2011-11-16 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 93de135ea36fa6ba11dda01755128b5177d13969 (commit)
   from 8768e7bc1ae850fcba8e88460e211b0a85cd37ab (commit)

commit 93de135ea36fa6ba11dda01755128b5177d13969
Author: Jannis Pohlmann 
Date:   Wed Nov 16 10:12:16 2011 +

Drop AC_LIBTOOL in favor of LT_PREREQ and LT_INIT.

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

diff --git a/configure.ac.in b/configure.ac.in
index 80b1a45..ea6be47 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -58,7 +58,8 @@ AC_PROG_INTLTOOL([0.31], [no-xml])
 dnl **
 dnl *** Initialize libtool ***
 dnl **
-AC_PROG_LIBTOOL()
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
 
 dnl **
 dnl *** Check for standard headers ***
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Drop the button next to the location entry in the tool bar.

2011-11-08 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 1c82b51da2829aaba70f6bf289d77a12c11401e3 (commit)
   from 284ab2e30656fcb70ad74f967b175ceb4f96d9a1 (commit)

commit 1c82b51da2829aaba70f6bf289d77a12c11401e3
Author: Jannis Pohlmann 
Date:   Tue Nov 8 14:58:27 2011 +0100

Drop the button next to the location entry in the tool bar.

 thunar/thunar-location-entry.c |  327 +---
 1 files changed, 1 insertions(+), 326 deletions(-)

diff --git a/thunar/thunar-location-entry.c b/thunar/thunar-location-entry.c
index d64dbc0..8082961 100644
--- a/thunar/thunar-location-entry.c
+++ b/thunar/thunar-location-entry.c
@@ -1,7 +1,7 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
  * Copyright (c) 2005-2006 Benedikt Meurer 
- * Copyright (c) 2009-2010 Jannis Pohlmann 
+ * Copyright (c) 2009-2011 Jannis Pohlmann 
  *
  * This program is free software; you can redistribute it and/or 
  * modify it under the terms of the GNU General Public License as
@@ -76,10 +76,6 @@ static gbooleanthunar_location_entry_accept_focus
  (ThunarLocationBa
 static voidthunar_location_entry_activate  (GtkWidget  
  *path_entry,
 
ThunarLocationEntry  *location_entry);
 static gbooleanthunar_location_entry_reset 
(ThunarLocationEntry  *location_entry);
-static voidthunar_location_entry_button_clicked(GtkWidget  
  *button,
-
ThunarLocationEntry  *location_entry);
-static voidthunar_location_entry_item_activated(GtkWidget  
  *item,
-
ThunarLocationEntry  *location_entry);
 
 
 
@@ -184,10 +180,6 @@ thunar_location_entry_location_bar_init 
(ThunarLocationBarIface *iface)
 static void
 thunar_location_entry_init (ThunarLocationEntry *location_entry)
 {
-  GtkSizeGroup *size_group;
-  GtkWidget*button;
-  GtkWidget*arrow;
-
   gtk_box_set_spacing (GTK_BOX (location_entry), 0);
   gtk_container_set_border_width (GTK_CONTAINER (location_entry), 4);
 
@@ -196,22 +188,6 @@ thunar_location_entry_init (ThunarLocationEntry 
*location_entry)
   g_signal_connect_after (G_OBJECT (location_entry->path_entry), "activate", 
G_CALLBACK (thunar_location_entry_activate), location_entry);
   gtk_box_pack_start (GTK_BOX (location_entry), location_entry->path_entry, 
TRUE, TRUE, 0);
   gtk_widget_show (location_entry->path_entry);
-
-  button = gtk_toggle_button_new ();
-  g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK 
(thunar_location_entry_button_clicked), location_entry);
-  g_signal_connect (G_OBJECT (button), "pressed", G_CALLBACK 
(thunar_location_entry_button_clicked), location_entry);
-  gtk_box_pack_start (GTK_BOX (location_entry), button, FALSE, FALSE, 0);
-  gtk_widget_show (button);
-
-  arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE);
-  gtk_container_add (GTK_CONTAINER (button), arrow);
-  gtk_widget_show (arrow);
-
-  /* make sure the entry and the button request the same height */
-  size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
-  gtk_size_group_add_widget (size_group, location_entry->path_entry);
-  gtk_size_group_add_widget (size_group, button);
-  g_object_unref (G_OBJECT (size_group));
 }
 
 
@@ -462,307 +438,6 @@ thunar_location_entry_reset (ThunarLocationEntry 
*location_entry)
 
 
 
-static void
-menu_position (GtkMenu  *menu,
-   gint *x,
-   gint *y,
-   gboolean *push_in,
-   gpointer  entry)
-{
-  GtkRequisition entry_request;
-  GtkRequisition menu_request;
-  GdkRectangle   geometry;
-  GdkScreen *screen;
-  GtkWidget *toplevel = gtk_widget_get_toplevel (entry);
-  gint   monitor;
-  gint   x0;
-  gint   y0;
-
-  gtk_widget_translate_coordinates (GTK_WIDGET (entry), toplevel, 0, 0, &x0, 
&y0);
-
-  gtk_widget_size_request (GTK_WIDGET (entry), &entry_request);
-  gtk_widget_size_request (GTK_WIDGET (menu), &menu_request);
-
-  gdk_window_get_position (GTK_WIDGET (entry)->window, x, y);
-
-  *x += x0 + gtk_container_get_border_width (GTK_CONTAINER (entry));
-  *y += y0 + (entry_request.height - gtk_container_get_border_width 
(GTK_CONTAINER (entry)));
-
-  /* verify the the menu is on-screen */
-  screen = gtk_widget_get_screen (GTK_WIDGET (entry));
-  if (G_LIKELY (screen != NULL))
-{
-  monitor = gdk_screen_get_monitor_at_point (screen, *x, *y);
-  gdk_screen_get_monitor_geometry (screen, monitor, &geometry);
-  if (*y + menu_request.height > geometry.y + geometry.height)
-*y -= menu_request.height - entry_request.height;
-}
-
-  *push_in = TRUE;
-}
-
-
-
-static void
-thunar_location_entry_button_clicked (GtkWidget  

[Xfce4-commits] Generate persistent unique IDs and names for custom actions.

2011-11-08 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/file-menu-custom-actions
 to d99e85d67d27ece202c0a79a0c916d21558a9e61 (commit)
   from 0edbd00ac4322efcf3d6eb155be8c3961a804707 (commit)

commit d99e85d67d27ece202c0a79a0c916d21558a9e61
Author: Jannis Pohlmann 
Date:   Tue Nov 8 14:34:51 2011 +0100

Generate persistent unique IDs and names for custom actions.

This adds an optional  element to the  element in
uca.xml. When loading the UCA model from uca.xml, we check for this
element in the parser. If it is not given, we generate a new ID with the
following signature:

  .-

After parsing we check if we have generated new IDs and, if so,
immediately save the model back to the uca.xml file. This part is a bit
of a hack but it will be a no-brainer once we've switched to xfconf, I
think.

The ThunarUcaEditor is extended so that it generates a unique ID for new
items with the same signature as above. It does not overwrite IDs of
existing custom actions.

Together this allows for a persistent association of custom actions with
keyboard shortcuts.

 plugins/thunar-uca/thunar-uca-editor.c   |   41 ++
 plugins/thunar-uca/thunar-uca-model.c|  123 +-
 plugins/thunar-uca/thunar-uca-model.h|5 +
 plugins/thunar-uca/thunar-uca-provider.c |   10 ++-
 plugins/thunar-uca/uca.xml.in|4 +-
 5 files changed, 159 insertions(+), 24 deletions(-)

diff --git a/plugins/thunar-uca/thunar-uca-editor.c 
b/plugins/thunar-uca/thunar-uca-editor.c
index 00add99..fa1c9f9 100644
--- a/plugins/thunar-uca/thunar-uca-editor.c
+++ b/plugins/thunar-uca/thunar-uca-editor.c
@@ -1,6 +1,7 @@
 /* $Id$ */
 /*-
  * Copyright (c) 2005-2007 Benedikt Meurer 
+ * Copyright (c) 2011 Jannis Pohlmann 
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -41,6 +42,9 @@ static void   thunar_uca_editor_set_icon_name   
(ThunarUcaEditor
 static ThunarUcaTypes thunar_uca_editor_get_types   (const ThunarUcaEditor 
 *uca_editor);
 static void   thunar_uca_editor_set_types   (ThunarUcaEditor   
 *uca_editor,
  ThunarUcaTypes
  types);
+static const gchar   *thunar_uca_editor_get_unique_id   (const ThunarUcaEditor 
 *uca_editor);
+static void   thunar_uca_editor_set_unique_id   (ThunarUcaEditor   
 *uca_editor,
+ const gchar   
 *unique_id);
 static void   thunar_uca_editor_command_clicked (ThunarUcaEditor   
 *uca_editor);
 static void   thunar_uca_editor_icon_clicked(ThunarUcaEditor   
 *uca_editor);
 
@@ -101,6 +105,7 @@ thunar_uca_editor_init (ThunarUcaEditor *uca_editor)
   GtkWidget  *table;
   GtkWidget  *hbox;
   GtkWidget  *vbox;
+  gchar  *unique_id;
 
   /* configure the dialog properties */
   gtk_dialog_add_button (GTK_DIALOG (uca_editor), GTK_STOCK_CANCEL, 
GTK_RESPONSE_CANCEL);
@@ -454,6 +459,11 @@ thunar_uca_editor_init (ThunarUcaEditor *uca_editor)
   gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.0f);
   gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
   gtk_widget_show (label);
+
+  /* set a unique ID for new items. this will be overridden by existing items 
*/
+  unique_id = thunar_uca_model_get_unique_id ();
+  thunar_uca_editor_set_unique_id (uca_editor, unique_id);
+  g_free (unique_id);
 }
 
 
@@ -751,6 +761,30 @@ thunar_uca_editor_set_types (ThunarUcaEditor *uca_editor,
 
 
 
+static const gchar*
+thunar_uca_editor_get_unique_id (const ThunarUcaEditor *uca_editor)
+{
+  g_return_val_if_fail (THUNAR_UCA_IS_EDITOR (uca_editor), NULL);
+  return g_object_get_data (G_OBJECT (uca_editor->icon_button), 
"thunar-uca-unique-id");
+}
+
+
+
+static void
+thunar_uca_editor_set_unique_id (ThunarUcaEditor *uca_editor,
+ const gchar *unique_id)
+{
+  g_return_if_fail (THUNAR_UCA_IS_EDITOR (uca_editor));
+
+  /* remember the unique ID for the item */
+  g_object_set_data_full (G_OBJECT (uca_editor->icon_button),
+  "thunar-uca-unique-id",
+  g_strdup (unique_id),
+  g_free);
+}
+
+
+
 /**
  * thunar_uca_editor_load:
  * @uca_editor  : a #ThunarUcaEditor.
@@ -771,6 +805,7 @@ thunar_uca_editor_load (ThunarUcaEditor *uca_editor,
   gchar *command;
   gchar *icon;
   gchar *name;
+  gchar *unique_id;
   gboolean   startup_notify;
 
   g_return_if_fail (THUNAR_UCA_IS_EDITOR (uca_editor));
@@ -785,6 +820,7 @@ thunar_uca_editor_load (ThunarUcaEditor *uca_editor,
   THUNAR_UCA_MODEL_COLUMN_TYPES, &types,
   THUNAR_UCA_MODEL_COLUMN_ICON, &icon,
   

[Xfce4-commits] Remove edit and clipboard actions from the file menu again.

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/file-menu-custom-actions
 to 0edbd00ac4322efcf3d6eb155be8c3961a804707 (commit)
   from 36dea6078ac20c1285342ff1d7d09a212e183f5b (commit)

commit 0edbd00ac4322efcf3d6eb155be8c3961a804707
Author: Jannis Pohlmann 
Date:   Mon Nov 7 03:33:58 2011 +0100

Remove edit and clipboard actions from the file menu again.

These items already show up in the edit menu. There is no need to have
them appear twice.

 thunar/thunar-standard-view-ui.xml |   10 --
 thunar/thunar-window-ui.xml|4 
 2 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/thunar/thunar-standard-view-ui.xml 
b/thunar/thunar-standard-view-ui.xml
index 896131c..0ddd6f4 100644
--- a/thunar/thunar-standard-view-ui.xml
+++ b/thunar/thunar-standard-view-ui.xml
@@ -15,16 +15,6 @@
 
 
   
-  
-
-
-
-
-  
-  
-
-
-  
   
 
   
diff --git a/thunar/thunar-window-ui.xml b/thunar/thunar-window-ui.xml
index 8e271b9..ebe5d50 100644
--- a/thunar/thunar-window-ui.xml
+++ b/thunar/thunar-window-ui.xml
@@ -21,10 +21,6 @@
 
   
   
-  
-  
-  
-  
   
   
   
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Initial work on adding custom and other actions to the file menu.

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/file-menu-custom-actions
 to 36dea6078ac20c1285342ff1d7d09a212e183f5b (commit)
   from b41afa0c255c50d92025540fd072a642c2158d02 (commit)

commit 36dea6078ac20c1285342ff1d7d09a212e183f5b
Author: Jannis Pohlmann 
Date:   Mon Nov 7 03:25:36 2011 +0100

Initial work on adding custom and other actions to the file menu.

Adding more items to the file menu would allow users to define keyboard
shortcuts for them. Unfortunately, the action names generated for menu
items from plugins are persistent only as long as the order does not
change. We need to find a better unique name for them, so that adding
them with gtk_action_group_add_action_with_accel() generates a unique
AND persistent accel path.

 plugins/thunar-uca/thunar-uca-provider.c |1 +
 thunar/thunar-launcher.c |4 +-
 thunar/thunar-standard-view-ui.xml   |   13 +++-
 thunar/thunar-standard-view.c|8 ++
 thunar/thunar-window-ui.xml  |9 ++-
 thunar/thunar-window.c   |  119 ++
 6 files changed, 148 insertions(+), 6 deletions(-)

diff --git a/plugins/thunar-uca/thunar-uca-provider.c 
b/plugins/thunar-uca/thunar-uca-provider.c
index 21e3c24..674af2f 100644
--- a/plugins/thunar-uca/thunar-uca-provider.c
+++ b/plugins/thunar-uca/thunar-uca-provider.c
@@ -216,6 +216,7 @@ thunar_uca_provider_get_file_actions (ThunarxMenuProvider 
*menu_provider,
   -1);
 
   /* generate a unique action name */
+  /* FIXME this name is persistent only if actions are not re-ordered 
in the GUI */
   name = g_strdup_printf ("ThunarUca::action-%d", 
++uca_provider->last_action_id);
 
   /* create the new action with the given parameters */
diff --git a/thunar/thunar-launcher.c b/thunar/thunar-launcher.c
index f479cf9..141ce03 100644
--- a/thunar/thunar-launcher.c
+++ b/thunar/thunar-launcher.c
@@ -770,7 +770,7 @@ thunar_launcher_update (ThunarLauncher *launcher)
   /* update the user interface depending on the current selection */
   if (G_LIKELY (n_selected_files == 0 || n_directories > 0))
 {
-  /** CASE 1: nothing selected or atleast one directory in the selection
+  /** CASE 1: nothing selected or at least one directory in the selection
**
** - "Open" and "Open in n New Windows" actions
**/
@@ -793,7 +793,7 @@ thunar_launcher_update (ThunarLauncher *launcher)
 }
   else
 {
-  /* the "Open" action is sensitive if we have atleast one selected 
file,
+  /* the "Open" action is sensitive if we have at least one selected 
file,
* the label is set to "Open in New Window" if we're not in a regular
* view (i.e. current_directory is not set) and have only one 
directory
* selected to reflect that this action will open a new window.
diff --git a/thunar/thunar-standard-view-ui.xml 
b/thunar/thunar-standard-view-ui.xml
index 3892f3a..896131c 100644
--- a/thunar/thunar-standard-view-ui.xml
+++ b/thunar/thunar-standard-view-ui.xml
@@ -1,9 +1,8 @@
 
 
   

[Xfce4-commits] Creating branch jannis/file-menu-custom-actions

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/file-menu-custom-actions
 as new branch
 to 36dea6078ac20c1285342ff1d7d09a212e183f5b (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/jannis/file-menu-custom-actions

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Simplify the shortcuts view code a bit.

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 284ab2e30656fcb70ad74f967b175ceb4f96d9a1 (commit)
   from 79c535f5c5c76235fad98f4369d0e5bf84935f50 (commit)

commit 284ab2e30656fcb70ad74f967b175ceb4f96d9a1
Author: Jannis Pohlmann 
Date:   Sun Nov 6 23:55:19 2011 +0100

Simplify the shortcuts view code a bit.

 thunar/thunar-shortcuts-view.c |  139 
 1 files changed, 40 insertions(+), 99 deletions(-)

diff --git a/thunar/thunar-shortcuts-view.c b/thunar/thunar-shortcuts-view.c
index ac55bb4..01f8026 100644
--- a/thunar/thunar-shortcuts-view.c
+++ b/thunar/thunar-shortcuts-view.c
@@ -74,12 +74,6 @@ enum
 
 
 
-typedef void (*ThunarShortcutsViewForeachGroupFunc) (ThunarShortcutsView *view,
- ThunarShortcutGroup 
*group,
- gpointer 
user_data);
-
-
-
 static void   thunar_shortcuts_view_constructed  
(GObject*object);
 static void   thunar_shortcuts_view_finalize 
(GObject*object);
 static void   thunar_shortcuts_view_get_property 
(GObject*object,
@@ -107,15 +101,9 @@ static void   
thunar_shortcuts_view_mount_added  (Thunar
 static void   thunar_shortcuts_view_volume_removed   
(ThunarShortcutsView*view,
   
GVolume*volume,
   
GVolumeMonitor *monitor);
-static void   thunar_shortcuts_view_remove_volume_shortcut   
(ThunarShortcutsView*view,
-  
ThunarShortcutGroup*group,
-  
gpointeruser_data);
 static void   thunar_shortcuts_view_mount_removed
(ThunarShortcutsView*view,
   
GMount *mount,
   
GVolumeMonitor *monitor);
-static void   thunar_shortcuts_view_remove_mount_shortcut
(ThunarShortcutsView*view,
-  
ThunarShortcutGroup*group,
-  
gpointeruser_data);
 static void   thunar_shortcuts_view_add_shortcut 
(ThunarShortcutsView*view,
   
ThunarShortcut *shortcut);
 static void   thunar_shortcuts_view_shortcut_activated   
(ThunarShortcutsView*view,
@@ -126,14 +114,9 @@ static void   
thunar_shortcuts_view_shortcut_state_changed   (Thunar
   
GtkStateTypeprevious_state,
   
ThunarShortcut *shortcut);
 static void   thunar_shortcuts_view_unselect_shortcuts   
(ThunarShortcutsView*view,
-  
ThunarShortcutGroup*group,
-  
gpointeruser_data);
+  
ThunarShortcut *exception);
 static void   thunar_shortcuts_view_unprelight_shortcuts 
(ThunarShortcutsView*view,
-  
ThunarShortcutGroup*group,
-  
gpointeruser_data);
-static void   thunar_shortcuts_view_foreach_group
(ThunarShortcutsView*view,
-  
ThunarShortcutsViewForeachGroupFunc func,
-  
gpointeruser_data);
+  
ThunarShortcut *shortcut);
 static void   thunar_shortcuts_view_open 
(ThunarShortcutsView

[Xfce4-commits] Prepare cancellation of pending activations, sensitivity of sendto item.

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 79c535f5c5c76235fad98f4369d0e5bf84935f50 (commit)
   from 098e2c7a996247e8d65bbbc87faf3cd3abb59527 (commit)

commit 79c535f5c5c76235fad98f4369d0e5bf84935f50
Author: Jannis Pohlmann 
Date:   Sun Nov 6 23:34:52 2011 +0100

Prepare cancellation of pending activations, sensitivity of sendto item.

 thunar/thunar-shortcut-group.c |   64 
 thunar/thunar-shortcut-group.h |5 +++
 thunar/thunar-shortcut.c   |   10 ++
 thunar/thunar-shortcut.h   |1 +
 thunar/thunar-shortcuts-view.c |   47 +
 5 files changed, 94 insertions(+), 33 deletions(-)

diff --git a/thunar/thunar-shortcut-group.c b/thunar/thunar-shortcut-group.c
index f4ff2fa..9b23619 100644
--- a/thunar/thunar-shortcut-group.c
+++ b/thunar/thunar-shortcut-group.c
@@ -411,6 +411,32 @@ thunar_shortcut_group_unprelight_shortcuts 
(ThunarShortcutGroup *group,
 
 
 void
+thunar_shortcut_group_cancel_activations (ThunarShortcutGroup *group,
+  ThunarShortcut  *exception)
+{
+  ThunarShortcut *shortcut;
+  GList  *children;
+  GList  *iter;
+
+  _thunar_return_if_fail (THUNAR_IS_SHORTCUT_GROUP (group));
+  _thunar_return_if_fail (exception == NULL || THUNAR_IS_SHORTCUT (exception));
+
+  children = gtk_container_get_children (GTK_CONTAINER (group->shortcuts));
+
+  for (iter = children; iter != NULL; iter = iter->next)
+{
+  shortcut = THUNAR_SHORTCUT (iter->data);
+
+  if (shortcut != exception)
+thunar_shortcut_cancel_activation (shortcut);
+}
+
+  g_list_free (children);
+}
+
+
+
+void
 thunar_shortcut_group_update_selection (ThunarShortcutGroup *group,
 ThunarFile  *file)
 {
@@ -497,3 +523,41 @@ thunar_shortcut_group_remove_mount_shortcut 
(ThunarShortcutGroup *group,
 
   g_list_free (children);
 }
+
+
+
+gboolean
+thunar_shortcut_group_find_shortcut_by_file (ThunarShortcutGroup *group,
+ ThunarFile  *file,
+ ThunarShortcut **result)
+{
+  ThunarShortcut *shortcut;
+  gboolean has_shortcut = FALSE;
+  GList   *children;
+  GList   *iter;
+
+  _thunar_return_val_if_fail (THUNAR_IS_SHORTCUT_GROUP (group), FALSE);
+  _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE);
+
+  children = gtk_container_get_children (GTK_CONTAINER (group->shortcuts));
+
+  if (result != NULL)
+*result = NULL;
+
+  for (iter = children; !has_shortcut && iter != NULL; iter = iter->next)
+{
+  shortcut = THUNAR_SHORTCUT (iter->data);
+
+  if (thunar_shortcut_matches_file (shortcut, file))
+{
+  if (result != NULL)
+*result = shortcut;
+
+  has_shortcut = TRUE;
+}
+}
+
+  g_list_free (children);
+
+  return has_shortcut;
+}
diff --git a/thunar/thunar-shortcut-group.h b/thunar/thunar-shortcut-group.h
index 0590d09..eed1d66 100644
--- a/thunar/thunar-shortcut-group.h
+++ b/thunar/thunar-shortcut-group.h
@@ -47,12 +47,17 @@ void   thunar_shortcut_group_unselect_shortcuts 
(ThunarShortcutGroup *gr
  ThunarShortcut  
*exception);
 void   thunar_shortcut_group_unprelight_shortcuts   (ThunarShortcutGroup 
*group,
  ThunarShortcut  
*exception);
+void   thunar_shortcut_group_cancel_activations (ThunarShortcutGroup 
*group,
+ ThunarShortcut  
*exception);
 void   thunar_shortcut_group_update_selection   (ThunarShortcutGroup 
*group,
  ThunarFile  
*file);
 void   thunar_shortcut_group_remove_volume_shortcut (ThunarShortcutGroup 
*group,
  GVolume 
*volume);
 void   thunar_shortcut_group_remove_mount_shortcut  (ThunarShortcutGroup 
*group,
  GMount  
*mount);
+gboolean   thunar_shortcut_group_find_shortcut_by_file  (ThunarShortcutGroup 
*group,
+ ThunarFile  
*file,
+ ThunarShortcut 
**result);
 
 G_END_DECLS
 
diff --git a/thunar/thunar-shortcut.c b/thunar/thunar-shortcut.c
index c619dd4..c13e51c 100644
--- a/thunar/thunar-shortcut.c
+++ b/thunar/thunar-shortcut.c
@@ -2049,6 +2049,16 @@ thunar_shortcut_resolve_and_activate (ThunarShortcut 
*shortcut,
 
 
 void
+thunar_shortcut_cancel_activation (ThunarShortcut *shortcut)
+{
+  _thunar_return_if_fail (THUNAR_IS_SHORTCUT (shortcut));
+
+  /* TODO we need a cancellable for the ThunarBrowser interface */
+}
+
+
+
+v

[Xfce4-commits] Squashme: Start working on the context menu.

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 84de37c6c611bbe48bc7cded213b645bf7cd1c74 (commit)
   from fbe09422f8193865eb415068a7706bc5484c5bee (commit)

commit 84de37c6c611bbe48bc7cded213b645bf7cd1c74
Author: Jannis Pohlmann 
Date:   Sun Nov 6 18:16:18 2011 +0100

Squashme: Start working on the context menu.

 thunar/thunar-shortcut.c   |4 +-
 thunar/thunar-shortcuts-view.c |  533 +++-
 2 files changed, 256 insertions(+), 281 deletions(-)

diff --git a/thunar/thunar-shortcut.c b/thunar/thunar-shortcut.c
index a4702a3..be761a3 100644
--- a/thunar/thunar-shortcut.c
+++ b/thunar/thunar-shortcut.c
@@ -707,8 +707,8 @@ thunar_shortcut_button_press_event (GtkWidget  *widget,
 }
   else if (event->button == 3)
 {
-  /* TODO start a context menu timeout */
-  g_debug ("right button press");
+  /* emit the context menu signal */
+  g_signal_emit (widget, SIGNAL_CONTEXT_MENU, 0);
 }
   else if (event->button == 2)
 {
diff --git a/thunar/thunar-shortcuts-view.c b/thunar/thunar-shortcuts-view.c
index 3990774..2888e2a 100644
--- a/thunar/thunar-shortcuts-view.c
+++ b/thunar/thunar-shortcuts-view.c
@@ -137,13 +137,9 @@ static void   
thunar_shortcuts_view_foreach_group(Thunar
 static void   thunar_shortcuts_view_open 
(ThunarShortcutsView*view,
   
ThunarFile *file,
   
gbooleannew_window);
+static void   thunar_shortcuts_view_shortcut_open
(ThunarShortcutsView*view,
+  
GtkMenuItem*item);
 #if 0
-static void   thunar_shortcuts_view_row_deleted  
(ThunarShortcutsView  *view,
-  
GtkTreePath  *path,
-  
GtkTreeModel *model);
-static gboolean   thunar_shortcuts_view_row_context_menu 
(ThunarShortcutsView  *view,
-  
GtkWidget*widget);
-static void   thunar_shortcuts_view_row_open 
(ThunarShortcutsView  *view);
 static void   thunar_shortcuts_view_row_open_new_window  
(ThunarShortcutsView  *view);
 static void   thunar_shortcuts_view_row_disconnect   
(ThunarShortcutsView  *view);
 static void   thunar_shortcuts_view_row_mount
(ThunarShortcutsView  *view);
@@ -156,6 +152,8 @@ static void   
thunar_shortcuts_view_find_selected_row(Thunar
   
ThunarShortcutRow*row,
   
gpointer  user_data);
 #endif
+static gboolean   thunar_shortcuts_view_shortcut_context_menu
(ThunarShortcutsView  *view,
+  
GtkWidget*widget);
 static void   thunar_shortcuts_view_update_selection 
(ThunarShortcutsView  *view,
   
ThunarShortcutGroup  *group,
   
gpointer  user_data);
@@ -181,8 +179,7 @@ struct _ThunarShortcutsView
 
 
 
-static GQuark thunar_shortcuts_view_idle_quark;
-static GQuark thunar_shortcuts_view_counter_quark;
+static GQuark thunar_shortcuts_view_quark;
 static guint  view_signals[LAST_SIGNAL];
 
 
@@ -197,10 +194,7 @@ thunar_shortcuts_view_class_init (ThunarShortcutsViewClass 
*klass)
 {
   GObjectClass   *gobject_class;
 
-  thunar_shortcuts_view_idle_quark = 
-g_quark_from_static_string ("thunar-shortcuts-view-idle");
-  thunar_shortcuts_view_counter_quark =
-g_quark_from_static_string ("thunar-shortcuts-view-counter");
+  thunar_shortcuts_view_quark = g_quark_from_static_string 
("thunar-shortcuts-view");
 
   gobject_class = G_OBJECT_CLASS (klass);
   gobject_class->constructed = thunar_shortcuts_view_constructed;
@@ -369,277 +363,10 @@ thunar_shortcuts_view_set_property (GObject  *object,
 
 
 
-#if 0
-static void
-thunar_shortcuts_view_row_deleted (ThunarShortcutsView *view,
-   GtkTreePath *path,
-

[Xfce4-commits] Squashme: Remove volume/mount shortcuts properly (unless persistent).

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to fbe09422f8193865eb415068a7706bc5484c5bee (commit)
   from 6d9c903dab4c5f175215e05765a0452abd537089 (commit)

commit fbe09422f8193865eb415068a7706bc5484c5bee
Author: Jannis Pohlmann 
Date:   Sun Nov 6 17:40:02 2011 +0100

Squashme: Remove volume/mount shortcuts properly (unless persistent).

 thunar/thunar-shortcut-group.c |   62 ++
 thunar/thunar-shortcut-group.h |   28 ++
 thunar/thunar-shortcuts-view.c |  111 
 3 files changed, 156 insertions(+), 45 deletions(-)

diff --git a/thunar/thunar-shortcut-group.c b/thunar/thunar-shortcut-group.c
index f774bf4..f4ff2fa 100644
--- a/thunar/thunar-shortcut-group.c
+++ b/thunar/thunar-shortcut-group.c
@@ -435,3 +435,65 @@ thunar_shortcut_group_update_selection 
(ThunarShortcutGroup *group,
 
   g_list_free (children);
 }
+
+
+
+void
+thunar_shortcut_group_remove_volume_shortcut (ThunarShortcutGroup *group,
+  GVolume *volume)
+{
+  ThunarShortcut *shortcut;
+  GVolume*shortcut_volume;
+  GList  *children;
+  GList  *iter;
+
+  _thunar_return_if_fail (THUNAR_IS_SHORTCUT_GROUP (group));
+  _thunar_return_if_fail (G_IS_VOLUME (volume));
+
+  children = gtk_container_get_children (GTK_CONTAINER (group->shortcuts));
+
+  for (iter = children; iter != NULL; iter = iter->next)
+{
+  shortcut = THUNAR_SHORTCUT (iter->data);
+  shortcut_volume = thunar_shortcut_get_volume (shortcut);
+
+  if (shortcut_volume == volume)
+gtk_container_remove (GTK_CONTAINER (group->shortcuts),
+  GTK_WIDGET (shortcut));
+}
+
+  g_list_free (children);
+}
+
+
+
+void
+thunar_shortcut_group_remove_mount_shortcut (ThunarShortcutGroup *group,
+ GMount  *mount)
+{
+  ThunarShortcut *shortcut;
+  GMount*shortcut_mount;
+  GList  *children;
+  GList  *iter;
+
+  _thunar_return_if_fail (THUNAR_IS_SHORTCUT_GROUP (group));
+  _thunar_return_if_fail (G_IS_MOUNT (mount));
+
+  children = gtk_container_get_children (GTK_CONTAINER (group->shortcuts));
+
+  for (iter = children; iter != NULL; iter = iter->next)
+{
+  shortcut = THUNAR_SHORTCUT (iter->data);
+
+  if (!thunar_shortcut_get_persistent (shortcut))
+{
+  shortcut_mount = thunar_shortcut_get_mount (shortcut);
+
+  if (shortcut_mount == mount)
+gtk_container_remove (GTK_CONTAINER (group->shortcuts),
+  GTK_WIDGET (shortcut));
+}
+}
+
+  g_list_free (children);
+}
diff --git a/thunar/thunar-shortcut-group.h b/thunar/thunar-shortcut-group.h
index 7112b33..0590d09 100644
--- a/thunar/thunar-shortcut-group.h
+++ b/thunar/thunar-shortcut-group.h
@@ -37,18 +37,22 @@ typedef struct _ThunarShortcutGroupPrivate 
ThunarShortcutGroupPrivate;
 typedef struct _ThunarShortcutGroupClass   ThunarShortcutGroupClass;
 typedef struct _ThunarShortcutGroupThunarShortcutGroup;
 
-GType  thunar_shortcut_group_get_type (void) G_GNUC_CONST;
-
-GtkWidget *thunar_shortcut_group_new  (const gchar 
*label,
-   ThunarShortcutType   
accepted_types);
-gboolean   thunar_shortcut_group_try_add_shortcut (ThunarShortcutGroup 
*group,
-   ThunarShortcut  
*shortcut);
-void   thunar_shortcut_group_unselect_shortcuts   (ThunarShortcutGroup 
*group,
-   ThunarShortcut  
*exception);
-void   thunar_shortcut_group_unprelight_shortcuts (ThunarShortcutGroup 
*group,
-   ThunarShortcut  
*exception);
-void   thunar_shortcut_group_update_selection (ThunarShortcutGroup 
*group,
-   ThunarFile  
*file);
+GType  thunar_shortcut_group_get_type   (void) G_GNUC_CONST;
+
+GtkWidget *thunar_shortcut_group_new(const gchar 
*label,
+ ThunarShortcutType   
accepted_types);
+gboolean   thunar_shortcut_group_try_add_shortcut   (ThunarShortcutGroup 
*group,
+ ThunarShortcut  
*shortcut);
+void   thunar_shortcut_group_unselect_shortcuts (ThunarShortcutGroup 
*group,
+ ThunarShortcut  
*exception);
+void   thunar_shortcut_group_unprelight_shortcuts   (ThunarShortcutGroup 
*group,
+ ThunarShortcut  
*exception);
+void   thunar_shortcut_group_update_selection   (Thu

[Xfce4-commits] Squashme: Update selection whenever the main folder changes.

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 6d9c903dab4c5f175215e05765a0452abd537089 (commit)
   from 1a1a680b0019943f3a7dc8b78a7c30dfc0c459d4 (commit)

commit 6d9c903dab4c5f175215e05765a0452abd537089
Author: Jannis Pohlmann 
Date:   Sun Nov 6 17:08:13 2011 +0100

Squashme: Update selection whenever the main folder changes.

 thunar/thunar-shortcut-group.c |   34 +++-
 thunar/thunar-shortcut-group.h |3 +
 thunar/thunar-shortcut.c   |   58 +
 thunar/thunar-shortcut.h   |6 +-
 thunar/thunar-shortcuts-view.c |  500 ++--
 5 files changed, 120 insertions(+), 481 deletions(-)

diff --git a/thunar/thunar-shortcut-group.c b/thunar/thunar-shortcut-group.c
index 214d2e4..f774bf4 100644
--- a/thunar/thunar-shortcut-group.c
+++ b/thunar/thunar-shortcut-group.c
@@ -171,9 +171,11 @@ thunar_shortcut_group_dispose (GObject *object)
 static void
 thunar_shortcut_group_finalize (GObject *object)
 {
-#if 0
   ThunarShortcutGroup *group = THUNAR_SHORTCUT_GROUP (object);
-#endif
+
+  /* abort flashing if still active */
+  if (group->flash_idle_id > 0)
+g_source_remove (group->flash_idle_id);
 
   (*G_OBJECT_CLASS (thunar_shortcut_group_parent_class)->finalize) (object);
 }
@@ -405,3 +407,31 @@ thunar_shortcut_group_unprelight_shortcuts 
(ThunarShortcutGroup *group,
 
   g_list_free (children);
 }
+
+
+
+void
+thunar_shortcut_group_update_selection (ThunarShortcutGroup *group,
+ThunarFile  *file)
+{
+  ThunarShortcut *shortcut;
+  GList  *children;
+  GList  *iter;
+
+  _thunar_return_if_fail (THUNAR_IS_SHORTCUT_GROUP (group));
+  _thunar_return_if_fail (THUNAR_IS_FILE (file));
+
+  children = gtk_container_get_children (GTK_CONTAINER (group->shortcuts));
+
+  for (iter = children; iter != NULL; iter = iter->next)
+{
+  shortcut = THUNAR_SHORTCUT (iter->data);
+
+  if (thunar_shortcut_matches_file (shortcut, file))
+gtk_widget_set_state (GTK_WIDGET (shortcut), GTK_STATE_SELECTED);
+  else if (gtk_widget_get_state (GTK_WIDGET (shortcut)) == 
GTK_STATE_SELECTED)
+gtk_widget_set_state (GTK_WIDGET (shortcut), GTK_STATE_NORMAL);
+}
+
+  g_list_free (children);
+}
diff --git a/thunar/thunar-shortcut-group.h b/thunar/thunar-shortcut-group.h
index 595a43b..7112b33 100644
--- a/thunar/thunar-shortcut-group.h
+++ b/thunar/thunar-shortcut-group.h
@@ -21,6 +21,7 @@
 #ifndef __THUNAR_SHORTCUT_GROUP_H__
 #define __THUNAR_SHORTCUT_GROUP_H__
 
+#include 
 #include 
 
 G_BEGIN_DECLS
@@ -46,6 +47,8 @@ void   thunar_shortcut_group_unselect_shortcuts   
(ThunarShortcutGroup *grou
ThunarShortcut  
*exception);
 void   thunar_shortcut_group_unprelight_shortcuts (ThunarShortcutGroup 
*group,
ThunarShortcut  
*exception);
+void   thunar_shortcut_group_update_selection (ThunarShortcutGroup 
*group,
+   ThunarFile  
*file);
 
 G_END_DECLS
 
diff --git a/thunar/thunar-shortcut.c b/thunar/thunar-shortcut.c
index 40ed477..a4702a3 100644
--- a/thunar/thunar-shortcut.c
+++ b/thunar/thunar-shortcut.c
@@ -2174,3 +2174,61 @@ thunar_shortcut_disconnect (ThunarShortcut *shortcut)
   /* release the mount operation */
   g_object_unref (mount_operation);
 }
+
+
+
+gboolean
+thunar_shortcut_matches_file (ThunarShortcut *shortcut,
+  ThunarFile *file)
+{
+  gboolean matches = FALSE;
+  GVolume *shortcut_volume;
+  GMount  *mount;
+  GFile   *mount_point;
+  GFile   *shortcut_file;
+
+  _thunar_return_val_if_fail (THUNAR_IS_SHORTCUT (shortcut), FALSE);
+  _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE);
+
+  /* get the file and volume of the view */
+  shortcut_file = thunar_shortcut_get_location (shortcut);
+  shortcut_volume = thunar_shortcut_get_volume (shortcut);
+
+  /* check if we have a volume */
+  if (shortcut_volume != NULL)
+{
+  /* get the mount point */
+  mount = g_volume_get_mount (shortcut_volume);
+  if (mount != NULL)
+{
+  mount_point = g_mount_get_root (mount);
+
+  /* select the shortcut if the mount point and the selected file are 
equal */
+  if (g_file_equal (file->gfile, mount_point))
+matches = TRUE;
+
+  /* release mount point and mount */
+  g_object_unref (mount_point);
+  g_object_unref (mount);
+}
+}
+  else if (shortcut->mount != NULL)
+{
+  mount_point = g_mount_get_root (shortcut->mount);
+
+  /* select the shortcut if the mount point and the selected file are 
equal */
+  if (g_file_equal (file->gfile, mount_point))
+matches = TRUE;
+
+  /* release mount point and mount */
+  g_object_unref (mount_point);
+}
+  else if (shortcut_file != NULL)
+{

[Xfce4-commits] Squashme: Add missing files. Make collapsed headers flash on new items.

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 1a1a680b0019943f3a7dc8b78a7c30dfc0c459d4 (commit)
   from d402ad0e0a8a06a7e38dbfc8beb909434a2ebe83 (commit)

commit 1a1a680b0019943f3a7dc8b78a7c30dfc0c459d4
Author: Jannis Pohlmann 
Date:   Sun Nov 6 16:16:19 2011 +0100

Squashme: Add missing files. Make collapsed headers flash on new items.

 thunar/thunar-shortcut-group.c |  407 
 thunar/thunar-shortcut-group.h |   52 +
 2 files changed, 459 insertions(+), 0 deletions(-)

diff --git a/thunar/thunar-shortcut-group.c b/thunar/thunar-shortcut-group.c
new file mode 100644
index 000..214d2e4
--- /dev/null
+++ b/thunar/thunar-shortcut-group.c
@@ -0,0 +1,407 @@
+/* vi:set et ai sw=2 sts=2 ts=2: */
+/*-
+ * Copyright (c) 2011 Jannis Pohlmann 
+ *
+ * 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., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+
+
+#define THUNAR_SHORTCUT_GROUP_FLASH_TIMEOUT 300
+#define THUNAR_SHORTCUT_GROUP_FLASH_TIMES 3
+
+
+
+/* property identifiers */
+enum
+{
+  PROP_0,
+  PROP_LABEL,
+  PROP_ACCCEPTED_TYPES,
+};
+
+
+
+static void thunar_shortcut_group_constructed   (GObject   
 *object);
+static void thunar_shortcut_group_dispose   (GObject   
 *object);
+static void thunar_shortcut_group_finalize  (GObject   
 *object);
+static void thunar_shortcut_group_get_property  (GObject   
 *object,
+ guint 
  prop_id,
+ GValue
 *value,
+ GParamSpec
 *pspec);
+static void thunar_shortcut_group_set_property  (GObject   
 *object,
+ guint 
  prop_id,
+ const GValue  
 *value,
+ GParamSpec
 *pspec);
+static void thunar_shortcut_group_attract_attention (ThunarShortcutGroup   
 *group);
+static gboolean thunar_shortcut_group_flash_expander(gpointer  
  user_data);
+
+
+
+struct _ThunarShortcutGroupClass
+{
+  GtkEventBoxClass __parent__;
+};
+
+struct _ThunarShortcutGroup
+{
+  GtkEventBox__parent__;
+
+  ThunarShortcutType accepted_types;
+
+  GtkWidget *expander;
+  GtkWidget *shortcuts;
+
+  guint  flash_idle_id;
+  guint  flash_count;
+};
+
+
+
+G_DEFINE_TYPE (ThunarShortcutGroup, thunar_shortcut_group, GTK_TYPE_EVENT_BOX)
+
+
+
+static void
+thunar_shortcut_group_class_init (ThunarShortcutGroupClass *klass)
+{
+  GObjectClass *gobject_class;
+
+  /* Determine the parent type class */
+  thunar_shortcut_group_parent_class = g_type_class_peek_parent (klass);
+
+  gobject_class = G_OBJECT_CLASS (klass);
+  gobject_class->constructed = thunar_shortcut_group_constructed; 
+  gobject_class->dispose = thunar_shortcut_group_dispose; 
+  gobject_class->finalize = thunar_shortcut_group_finalize; 
+  gobject_class->get_property = thunar_shortcut_group_get_property;
+  gobject_class->set_property = thunar_shortcut_group_set_property;
+
+  g_object_class_install_property (gobject_class,
+   PROP_LABEL,
+   g_param_spec_string ("label",
+"label",
+"label",
+NULL,
+G_PARAM_READWRITE |
+
G_PARAM_CONSTRUCT_ONLY));
+
+  g_object_class_install_property (gobject_class,
+   PROP_ACCCEPTED_TYPES,
+   g_param_spec_flags ("accepted-types",
+   "accepted-types",
+ 

[Xfce4-commits] Squashme: Implement shortcut activation and fix state transitions.

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to d402ad0e0a8a06a7e38dbfc8beb909434a2ebe83 (commit)
   from 867a219b95a1d2055452b9c0a95ea5e4841bf479 (commit)

commit d402ad0e0a8a06a7e38dbfc8beb909434a2ebe83
Author: Jannis Pohlmann 
Date:   Sun Nov 6 16:00:07 2011 +0100

Squashme: Implement shortcut activation and fix state transitions.

 thunar/thunar-shortcut.c   |   15 ---
 thunar/thunar-shortcuts-view.c |  224 +---
 2 files changed, 187 insertions(+), 52 deletions(-)

diff --git a/thunar/thunar-shortcut.c b/thunar/thunar-shortcut.c
index d3d8110..40ed477 100644
--- a/thunar/thunar-shortcut.c
+++ b/thunar/thunar-shortcut.c
@@ -110,8 +110,6 @@ static gboolean thunar_shortcut_focus   
(GtkWidget
  GtkDirectionType  
  direction);
 static gboolean thunar_shortcut_focus_in_event  (GtkWidget 
 *widget,
  GdkEventFocus 
 *event);
-static gboolean thunar_shortcut_focus_out_event (GtkWidget 
 *widget,
- GdkEventFocus 
 *event);
 static void thunar_shortcut_size_request(GtkWidget 
 *widget,
  GtkRequisition
 *requisition);
 static void thunar_shortcut_button_state_changed(ThunarShortcut
 *shortcut,
@@ -242,7 +240,6 @@ thunar_shortcut_class_init (ThunarShortcutClass *klass)
   gtkwidget_class->expose_event = thunar_shortcut_expose_event;
   gtkwidget_class->focus = thunar_shortcut_focus;
   gtkwidget_class->focus_in_event = thunar_shortcut_focus_in_event;
-  gtkwidget_class->focus_out_event = thunar_shortcut_focus_out_event;
   gtkwidget_class->size_request = thunar_shortcut_size_request;
 
   g_object_class_install_property (gobject_class,
@@ -928,18 +925,6 @@ thunar_shortcut_focus_in_event (GtkWidget *widget,
 
 
 
-static gboolean
-thunar_shortcut_focus_out_event (GtkWidget *widget,
- GdkEventFocus *event)
-{
-  _thunar_return_val_if_fail (THUNAR_IS_SHORTCUT (widget), FALSE);
-
-  gtk_widget_set_state (widget, GTK_STATE_NORMAL);
-  return TRUE;
-}
-
-
-
 static void
 thunar_shortcut_size_request (GtkWidget  *widget,
   GtkRequisition *requisition)
diff --git a/thunar/thunar-shortcuts-view.c b/thunar/thunar-shortcuts-view.c
index 41c6f55..b56422a 100644
--- a/thunar/thunar-shortcuts-view.c
+++ b/thunar/thunar-shortcuts-view.c
@@ -74,40 +74,57 @@ enum
 
 
 
-#if 0
-typedef void (*ThunarShortcutsViewForeachRowFunc) (ThunarShortcutsView *view,
-   ThunarShortcutRow   *row,
-   gpointer 
user_data);
-#endif
-
-
-
-static void   thunar_shortcuts_view_constructed  
(GObject  *object);
-static void   thunar_shortcuts_view_finalize 
(GObject  *object);
-static void   thunar_shortcuts_view_get_property 
(GObject  *object,
-  
guint prop_id,
-  
GValue   *value,
-  
GParamSpec   *pspec);
-static void   thunar_shortcuts_view_set_property 
(GObject  *object,
-  
guint prop_id,
-  
const GValue *value,
-  
GParamSpec   *pspec);
-static gboolean   thunar_shortcuts_view_load_system_shortcuts
(gpointer  user_data);
-static void   thunar_shortcuts_view_create_home_shortcut 
(ThunarShortcutsView  *view);
-static void   thunar_shortcuts_view_create_desktop_shortcut  
(ThunarShortcutsView  *view);
-static void   thunar_shortcuts_view_create_trash_shortcut
(ThunarShortcutsView  *view);
-static void   thunar_shortcuts_view_create_network_shortcut  
(ThunarShortcutsView  *view);
-static gboolean   thunar_shortcuts_view_load_user_dirs   
(gpointer  user_data);
-static gboolean   thunar_shortcuts_view_load_bookmarks   
(gpointer  user_data);
-

[Xfce4-commits] Update NEWS.

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/xfce-4.8
 to c0bf8673a4388d5fdf4a0c6d1a069599c2921044 (commit)
   from 493db02bdbc6ec667cd04e75a77dff8366ec1bc0 (commit)

commit c0bf8673a4388d5fdf4a0c6d1a069599c2921044
Author: Jannis Pohlmann 
Date:   Sun Nov 6 15:25:07 2011 +0100

Update NEWS.

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

diff --git a/NEWS b/NEWS
index d290ce3..a0cb0dd 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
 1.2.x
 =
+- Fix sorting of filenames with large numbers (bug #5356).
+  Patch by Erik Koegel.
 
 1.2.3
 =
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix sorting of filenames with large numbers (bug #5356).

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/xfce-4.8
 to 493db02bdbc6ec667cd04e75a77dff8366ec1bc0 (commit)
   from 7bbb212ca35f28ce42a935e1a1f283feec376911 (commit)

commit 493db02bdbc6ec667cd04e75a77dff8366ec1bc0
Author: Eric Koegel 
Date:   Sun Nov 6 16:58:33 2011 +0300

Fix sorting of filenames with large numbers (bug #5356).

Change compare_by_name_using_number() to use guint64.

Signed-off-by: Jannis Pohlmann 

 thunar/thunar-file.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 909da25..44cdb31 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -3168,12 +3168,12 @@ static gint
 compare_by_name_using_number (const gchar *ap,
   const gchar *bp)
 {
-  guint anum;
-  guint bnum;
+  guint64 anum;
+  guint64 bnum;
 
   /* determine the numbers in ap and bp */
-  anum = strtoul (ap, NULL, 10);
-  bnum = strtoul (bp, NULL, 10);
+  anum = strtouq (ap, NULL, 10);
+  bnum = strtouq (bp, NULL, 10);
 
   /* compare the numbers */
   if (anum < bnum)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Update NEWS.

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to b41afa0c255c50d92025540fd072a642c2158d02 (commit)
   from 464e9a39f4490b7bd4da0ee902018c9a98950d8f (commit)

commit b41afa0c255c50d92025540fd072a642c2158d02
Author: Jannis Pohlmann 
Date:   Sun Nov 6 15:23:23 2011 +0100

Update NEWS.

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

diff --git a/NEWS b/NEWS
index 7c1609e..015a7cf 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,8 @@
   Patch by Martin Jürgens and Mark Trompell.
 - Show translated names of desktop files (bug #7393).
   Fix by Lionel Le Folgoc.
+- Fix sorting of filenames with large numbers (bug #5356).
+  Patch by Eric Koegel.
 
 1.3.0
 =
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix sorting of filenames with large numbers (bug #5356).

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 464e9a39f4490b7bd4da0ee902018c9a98950d8f (commit)
   from bb18fa8c31c0f1fa10b84010a5b05174378fd558 (commit)

commit 464e9a39f4490b7bd4da0ee902018c9a98950d8f
Author: Eric Koegel 
Date:   Sun Nov 6 16:58:33 2011 +0300

Fix sorting of filenames with large numbers (bug #5356).

Change compare_by_name_using_number() to use guint64.

Signed-off-by: Jannis Pohlmann 

 thunar/thunar-file.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 9e5393c..4090d9f 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -3177,12 +3177,12 @@ static gint
 compare_by_name_using_number (const gchar *ap,
   const gchar *bp)
 {
-  guint anum;
-  guint bnum;
+  guint64 anum;
+  guint64 bnum;
 
   /* determine the numbers in ap and bp */
-  anum = strtoul (ap, NULL, 10);
-  bnum = strtoul (bp, NULL, 10);
+  anum = strtouq (ap, NULL, 10);
+  bnum = strtouq (bp, NULL, 10);
 
   /* compare the numbers */
   if (anum < bnum)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Squashme: Further work on getting rid of ThunarShortcuts{Model, Row}.

2011-11-06 Thread Jannis Pohlmann
Updating branch refs/heads/jannis/new-shortcuts-pane
 to 867a219b95a1d2055452b9c0a95ea5e4841bf479 (commit)
   from 98bd465376724a640b378b71715b5dc39ef4bac7 (commit)

commit 867a219b95a1d2055452b9c0a95ea5e4841bf479
Author: Jannis Pohlmann 
Date:   Sun Nov 6 14:57:33 2011 +0100

Squashme: Further work on getting rid of ThunarShortcuts{Model,Row}.

 thunar/thunar-shortcut.c   |  911 ++--
 thunar/thunar-shortcut.h   |   89 ++--
 thunar/thunar-shortcuts-view.c |   91 
 3 files changed, 916 insertions(+), 175 deletions(-)

diff --git a/thunar/thunar-shortcut.c b/thunar/thunar-shortcut.c
index 5ad9dbf..d3d8110 100644
--- a/thunar/thunar-shortcut.c
+++ b/thunar/thunar-shortcut.c
@@ -27,10 +27,13 @@
 
 #include 
 
+#include 
+
 #include 
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -74,36 +77,90 @@ enum
 /* row states */
 typedef enum
 {
-  THUNAR_SHORTCUT_NORMAL,
-  THUNAR_SHORTCUT_RESOLVING,
-  THUNAR_SHORTCUT_EJECTING,
+  THUNAR_SHORTCUT_STATE_NORMAL,
+  THUNAR_SHORTCUT_STATE_RESOLVING,
+  THUNAR_SHORTCUT_STATE_EJECTING,
 } ThunarShortcutState;
 
 
 
-static void thunar_shortcut_constructed (GObject   
*object);
-static void thunar_shortcut_finalize(GObject   
*object);
-static void thunar_shortcut_get_property(GObject   
*object,
- guint  
prop_id,
- GValue
*value,
- GParamSpec
*pspec);
-static void thunar_shortcut_set_property(GObject   
*object,
- guint  
prop_id,
- const GValue  
*value,
- GParamSpec
*pspec);
-static void thunar_shortcut_size_request(GtkWidget 
*widget,
- GtkRequisition
*requisition);
-static gboolean thunar_shortcut_matches_types   (ThunarShortcut
*shortcut,
- ThunarShortcutType 
types);
-static void thunar_shortcut_location_changed(ThunarShortcut
*shortcut);
-static void thunar_shortcut_file_changed(ThunarShortcut
*shortcut);
-static void thunar_shortcut_icon_changed(ThunarShortcut
*shortcut);
-static void thunar_shortcut_resolve_location_finish (ThunarBrowser 
*browser,
- GFile 
*location,
- ThunarFile
*file,
- ThunarFile
*target_file,
- GError
*error,
- gpointer   
user_data);
+static void thunar_shortcut_constructed (GObject   
 *object);
+static void thunar_shortcut_finalize(GObject   
 *object);
+static void thunar_shortcut_get_property(GObject   
 *object,
+ guint 
  prop_id,
+ GValue
 *value,
+ GParamSpec
 *pspec);
+static void thunar_shortcut_set_property(GObject   
 *object,
+ guint 
  prop_id,
+ const GValue  
 *value,
+ GParamSpec
 *pspec);
+static gboolean thunar_shortcut_button_press_event  (GtkWidget 
 *widget,
+ GdkEventButton
 *event);
+static gboolean thunar_shortcut_button_release_event(GtkWidget 
 *widget,
+ GdkEventButton
 *event);
+static gboolean thunar_shortcut_key_press_event (GtkWidget 
 *widget,
+ GdkEventKey   
 *event);
+static gboolean thunar_shortcut_enter_notify_event  (GtkWidget 
 *widget,
+ GdkEventCrossing  
 *event);
+static gboolean thunar_shortcut_leave_notify_event  (GtkWidget 
 *widget,
+ GdkEventCrossing  
 *event);
+static gboolean

[Xfce4-commits] Add Nick to the AUTHORS file.

2011-11-02 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 14bcb51730324e875478d7b7b98093bd18cf8937 (commit)
   from 30a507086abf809aa44809596b71ffdc5b156678 (commit)

commit 14bcb51730324e875478d7b7b98093bd18cf8937
Author: Jannis Pohlmann 
Date:   Thu Nov 3 00:45:50 2011 +0100

Add Nick to the AUTHORS file.

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

diff --git a/AUTHORS b/AUTHORS
index 9c12c7b..cdc8c55 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -2,3 +2,4 @@ Jannis Pohlmann 
 Philip Van Hoof 
 
 GStreamer video thumbnailer by Ross Burton 
+ODF thumbnailer by Nick Schermer 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Update the TODO.

2011-11-02 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 30a507086abf809aa44809596b71ffdc5b156678 (commit)
   from d168f769641c3d1939a0dadf5644d5da7202385d (commit)

commit 30a507086abf809aa44809596b71ffdc5b156678
Author: Jannis Pohlmann 
Date:   Wed Nov 2 23:48:16 2011 +0100

Update the TODO.

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

diff --git a/TODO b/TODO
index 6c97b03..9bfd582 100644
--- a/TODO
+++ b/TODO
@@ -13,3 +13,8 @@ Tumbler TODO List
   - make it possible for thumbnailer plugins to notify the registry
 that their supported URI schemes and MIME types have changed (this
 is required for the ThunarVFS thumbnailer plugin to work).
+
+  - create a utility library that wraps functionality like pixbuf
+loading, scaling, converting to TumblerImageData, as well as macros
+to write thumbnailer plugins with a single macro and thumbnailing 
+function.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Some fixes for previous commit.

2011-11-02 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to d168f769641c3d1939a0dadf5644d5da7202385d (commit)
   from 7871f2e665d7e1400d973750e0107d3e52447001 (commit)

commit d168f769641c3d1939a0dadf5644d5da7202385d
Author: Nick Schermer 
Date:   Sat Oct 29 00:14:44 2011 +0200

Some fixes for previous commit.

 plugins/pixbuf-thumbnailer/pixbuf-thumbnailer.c |   16 +++-
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/plugins/pixbuf-thumbnailer/pixbuf-thumbnailer.c 
b/plugins/pixbuf-thumbnailer/pixbuf-thumbnailer.c
index 13554ec..a1f81cc 100644
--- a/plugins/pixbuf-thumbnailer/pixbuf-thumbnailer.c
+++ b/plugins/pixbuf-thumbnailer/pixbuf-thumbnailer.c
@@ -143,7 +143,7 @@ pixbuf_thumbnailer_new_from_stream (GInputStream  
*stream,
 {
   GdkPixbufLoader *loader;
   gssize   n_read;
-  gboolean result = TRUE;
+  gboolean result;
   GdkPixbuf   *pixbuf = NULL;
   guchar   buffer[65536];
 
@@ -160,13 +160,16 @@ pixbuf_thumbnailer_new_from_stream (GInputStream  
*stream,
   n_read = g_input_stream_read (stream, buffer, sizeof (buffer),
 cancellable, error);
 
-  if (n_read <= 0)
+  if (n_read < 0)
 {
-  result = (n_read == 0);
+  result = FALSE;
   error = NULL;
   break;
 }
 
+  if (n_read == 0)
+break;
+
   if (!gdk_pixbuf_loader_write (loader, buffer, n_read, error))
 {
   result = FALSE;
@@ -234,17 +237,19 @@ pixbuf_thumbnailer_create (TumblerAbstractThumbnailer 
*thumbnailer,
   thumbnail = tumbler_file_info_get_thumbnail (info);
   g_assert (thumbnail != NULL);
 
-  /* load the scaled pixbuf from the stream */
+  /* load the scaled pixbuf from the stream. this works like
+   * gdk_pixbuf_new_from_file_at_scale(), but without increasing the
+   * pixbuf size. */
   pixbuf = pixbuf_thumbnailer_new_from_stream (G_INPUT_STREAM (stream), 
thumbnail,
cancellable, &error);
 
   g_object_unref (stream);
-  g_object_unref (thumbnail);
 
   if (pixbuf == NULL)
 {
   g_signal_emit_by_name (thumbnailer, "error", uri, error->code, 
error->message);
   g_error_free (error);
+  g_object_unref (thumbnail);
   return;
 }
 
@@ -273,4 +278,5 @@ pixbuf_thumbnailer_create (TumblerAbstractThumbnailer 
*thumbnailer,
 }
 
   g_object_unref (pixbuf);
+  g_object_unref (thumbnail);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Optimize the pixbuf thumbnailer.

2011-11-02 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 7871f2e665d7e1400d973750e0107d3e52447001 (commit)
   from 851a149213c2b3cf2c961e77cc29f18f687d409b (commit)

commit 7871f2e665d7e1400d973750e0107d3e52447001
Author: Nick Schermer 
Date:   Fri Oct 28 23:06:56 2011 +0200

Optimize the pixbuf thumbnailer.

Scale the pixbuf while loading the data from the filesystem.
This avoids a double copy of the pixbuf in memory and does
not increase the pixbuf size gdk_pixbuf_new_from_stream_at_scale
would do.

 plugins/pixbuf-thumbnailer/pixbuf-thumbnailer.c |  177 +++
 1 files changed, 117 insertions(+), 60 deletions(-)

diff --git a/plugins/pixbuf-thumbnailer/pixbuf-thumbnailer.c 
b/plugins/pixbuf-thumbnailer/pixbuf-thumbnailer.c
index 37ea1dc..13554ec 100644
--- a/plugins/pixbuf-thumbnailer/pixbuf-thumbnailer.c
+++ b/plugins/pixbuf-thumbnailer/pixbuf-thumbnailer.c
@@ -9,11 +9,11 @@
  *
  * This library 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 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU Library General Public License for more details.
  *
- * You should have received a copy of the GNU Library General 
- * Public License along with this library; if not, write to the 
+ * You should have received a copy of the GNU Library General
+ * Public License along with this library; if not, write to the
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
@@ -53,7 +53,7 @@ struct _PixbufThumbnailer
 
 
 
-G_DEFINE_DYNAMIC_TYPE (PixbufThumbnailer, 
+G_DEFINE_DYNAMIC_TYPE (PixbufThumbnailer,
pixbuf_thumbnailer,
TUMBLER_TYPE_ABSTRACT_THUMBNAILER);
 
@@ -92,42 +92,105 @@ pixbuf_thumbnailer_init (PixbufThumbnailer *thumbnailer)
 
 
 
-static GdkPixbuf *
-generate_pixbuf (GdkPixbuf  *source,
- TumblerThumbnailFlavor *flavor)
+static void
+pixbuf_thumbnailer_size_prepared (GdkPixbufLoader  *loader,
+  gint  source_width,
+  gint  source_height,
+  TumblerThumbnail *thumbnail)
 {
-  gdoublehratio;
-  gdoublewratio;
-  gint   dest_width;
-  gint   dest_height;
-  gint   source_width;
-  gint   source_height;
-
-  /* determine the source pixbuf dimensions */
-  source_width = gdk_pixbuf_get_width (source);
-  source_height = gdk_pixbuf_get_height (source);
-
-  /* determine the desired size for this flavor */
+  TumblerThumbnailFlavor *flavor;
+  gintdest_width;
+  gintdest_height;
+  gdouble hratio;
+  gdouble wratio;
+
+  g_return_if_fail (GDK_IS_PIXBUF_LOADER (loader));
+  g_return_if_fail (TUMBLER_IS_THUMBNAIL (thumbnail));
+
+  flavor = tumbler_thumbnail_get_flavor (thumbnail);
   tumbler_thumbnail_flavor_get_size (flavor, &dest_width, &dest_height);
+  g_object_unref (flavor);
 
-  /* return the same pixbuf if no scaling is required */
   if (source_width <= dest_width && source_height <= dest_height)
-return g_object_ref (source);
+{
+  /* do not scale the image */
+  dest_width = source_width;
+  dest_height = source_height;
+}
+  else
+{
+  /* determine which axis needs to be scaled down more */
+  wratio = (gdouble) source_width / (gdouble) dest_width;
+  hratio = (gdouble) source_height / (gdouble) dest_height;
+
+  /* adjust the other axis */
+  if (hratio > wratio)
+dest_width = rint (source_width / hratio);
+ else
+dest_height = rint (source_height / wratio);
+}
 
-  /* determine which axis needs to be scaled down more */
-  wratio = (gdouble) source_width / (gdouble) dest_width;
-  hratio = (gdouble) source_height / (gdouble) dest_height;
+  gdk_pixbuf_loader_set_size (loader, MAX (dest_width, 1), MAX (dest_height, 
1));
+}
 
-  /* adjust the other axis */
-  if (hratio > wratio)
-dest_width = rint (source_width / hratio);
-  else
-dest_height = rint (source_height / wratio);
-  
-  /* scale the pixbuf down to the desired size */
-  return gdk_pixbuf_scale_simple (source, 
-  MAX (dest_width, 1), MAX (dest_height, 1), 
-  GDK_INTERP_BILINEAR);
+
+
+static GdkPixbuf *
+pixbuf_thumbnailer_new_from_stream (GInputStream  *stream,
+TumblerThumbnail  *thumbnail,
+GCancellable  *cancellable,
+GError   **error)
+{
+  GdkPixbufLoader *loader;
+  gssize   n_read;
+  gboolean result = TRUE;
+  GdkPixbuf   *pixbuf = NULL;
+  guchar   buffer[65536];
+
+  g_return_val_if_fail (G_IS_INPUT_STREAM (st

[Xfce4-commits] Add support for OpenRaster images in the ODF thumbnailer (bug #6108).

2011-11-02 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 851a149213c2b3cf2c961e77cc29f18f687d409b (commit)
   from c1f2f2fb7a01a51f1e52a74189c5b94b05054b57 (commit)

commit 851a149213c2b3cf2c961e77cc29f18f687d409b
Author: Jannis Pohlmann 
Date:   Wed Nov 2 23:13:27 2011 +0100

Add support for OpenRaster images in the ODF thumbnailer (bug #6108).

 NEWS   |1 +
 plugins/odf-thumbnailer/odf-thumbnailer-plugin.c   |4 ++--
 plugins/odf-thumbnailer/odf-thumbnailer-provider.c |1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index d78a2d7..b11c995 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@
 - Fix generation of video images by starting the pipeline (bug #7996).
 - Fix ownership race conditions when started twice (bug #8001).
 - Add an ODF thumbnailer plugin.
+- Add support for OpenRaster images in the ODF thumbnailer (bug #6108).
 
 0.1.22
 ==
diff --git a/plugins/odf-thumbnailer/odf-thumbnailer-plugin.c 
b/plugins/odf-thumbnailer/odf-thumbnailer-plugin.c
index 852632e..3463c5a 100644
--- a/plugins/odf-thumbnailer/odf-thumbnailer-plugin.c
+++ b/plugins/odf-thumbnailer/odf-thumbnailer-plugin.c
@@ -61,7 +61,7 @@ tumbler_plugin_initialize (TumblerProviderPlugin *plugin)
 }
 
 #ifdef DEBUG
-  g_message (_("Initializing the Tumbler Odf Thumbnailer plugin"));
+  g_message (_("Initializing the Tumbler ODF Thumbnailer plugin"));
 #endif
 
   /* register the types provided by this plugin */
@@ -78,7 +78,7 @@ void
 tumbler_plugin_shutdown (void)
 {
 #ifdef DEBUG
-  g_message (_("Shutting down the Tumbler Odf Thumbnailer plugin"));
+  g_message (_("Shutting down the Tumbler ODF Thumbnailer plugin"));
 #endif
 }
 
diff --git a/plugins/odf-thumbnailer/odf-thumbnailer-provider.c 
b/plugins/odf-thumbnailer/odf-thumbnailer-provider.c
index d88c437..c1bac4d 100644
--- a/plugins/odf-thumbnailer/odf-thumbnailer-provider.c
+++ b/plugins/odf-thumbnailer/odf-thumbnailer-provider.c
@@ -132,6 +132,7 @@ odf_thumbnailer_provider_get_thumbnailers 
(TumblerThumbnailerProvider *provider)
 "application/vnd.sun.xml.draw.template",
 "application/vnd.sun.xml.draw",
 "application/vnd.sun.xml.math",
+"image/openraster",
 NULL
   };
   OdfThumbnailer*thumbnailer;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Improve error reporting in the ODF thumbnailer plugin.

2011-11-02 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to c1f2f2fb7a01a51f1e52a74189c5b94b05054b57 (commit)
   from ec00417c0826122b0a905f75631d984e10ab73d0 (commit)

commit c1f2f2fb7a01a51f1e52a74189c5b94b05054b57
Author: Jannis Pohlmann 
Date:   Wed Nov 2 23:11:16 2011 +0100

Improve error reporting in the ODF thumbnailer plugin.

 NEWS  |1 +
 plugins/odf-thumbnailer/odf-thumbnailer.c |   54 +
 2 files changed, 40 insertions(+), 15 deletions(-)

diff --git a/NEWS b/NEWS
index c93ec82..d78a2d7 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@
 ==
 - Fix generation of video images by starting the pipeline (bug #7996).
 - Fix ownership race conditions when started twice (bug #8001).
+- Add an ODF thumbnailer plugin.
 
 0.1.22
 ==
diff --git a/plugins/odf-thumbnailer/odf-thumbnailer.c 
b/plugins/odf-thumbnailer/odf-thumbnailer.c
index b19b8a7..6a8b219 100644
--- a/plugins/odf-thumbnailer/odf-thumbnailer.c
+++ b/plugins/odf-thumbnailer/odf-thumbnailer.c
@@ -1,5 +1,6 @@
 /* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
+ * Copyright (c) 2011 Jannis Pohlmann 
  * Copyright (c) 2011 Nick Schermer 
  *
  * This library is free software; you can redistribute it and/or
@@ -157,20 +158,22 @@ odf_thumbnailer_size_prepared (GdkPixbufLoader  *loader,
 static GdkPixbuf *
 odf_thumbnailer_create_from_data (const guchar *data,
   gsize bytes,
-  TumblerThumbnail *thumbnail)
+  TumblerThumbnail *thumbnail,
+  GError  **error)
 {
   GdkPixbufLoader *loader;
   GdkPixbuf   *pixbuf = NULL;
-  GError  *error = NULL;
+  GError  *err = NULL;
 
   g_return_val_if_fail (TUMBLER_IS_THUMBNAIL (thumbnail), NULL);
+  g_return_val_if_fail (error == NULL || *error == NULL, NULL);
 
   loader = gdk_pixbuf_loader_new ();
   g_signal_connect (loader, "size-prepared",
   G_CALLBACK (odf_thumbnailer_size_prepared), thumbnail);
-  if (gdk_pixbuf_loader_write (loader, data, bytes, &error))
+  if (gdk_pixbuf_loader_write (loader, data, bytes, &err))
 {
-  if (gdk_pixbuf_loader_close (loader, &error))
+  if (gdk_pixbuf_loader_close (loader, &err))
 {
   pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
   if (pixbuf != NULL)
@@ -183,6 +186,10 @@ odf_thumbnailer_create_from_data (const guchar *data,
 }
   g_object_unref (loader);
 
+  /* forward errors to the caller */
+  if (err != NULL)
+g_propagate_error (error, err);
+
   return pixbuf;
 }
 
@@ -190,7 +197,8 @@ odf_thumbnailer_create_from_data (const guchar *data,
 
 static GdkPixbuf *
 odf_thumbnailer_create_zip (GsfInfile*infile,
-TumblerThumbnail *thumbnail)
+TumblerThumbnail *thumbnail,
+GError  **error)
 {
   GsfInput *thumb_file;
   gsize bytes;
@@ -198,6 +206,7 @@ odf_thumbnailer_create_zip (GsfInfile*infile,
   GdkPixbuf*pixbuf = NULL;
 
   g_return_val_if_fail (GSF_IS_INFILE_ZIP (infile), NULL);
+  g_return_val_if_fail (error == NULL || *error == NULL, NULL);
 
   /* openoffice and libreoffice thumbnail */
   thumb_file = gsf_infile_child_by_vname (infile, "Thumbnails", 
"thumbnail.png", NULL);
@@ -213,7 +222,7 @@ odf_thumbnailer_create_zip (GsfInfile*infile,
   bytes = gsf_input_remaining (thumb_file);
   data = gsf_input_read (thumb_file, bytes, NULL);
   if (data != NULL)
-pixbuf = odf_thumbnailer_create_from_data (data, bytes, thumbnail);
+pixbuf = odf_thumbnailer_create_from_data (data, bytes, thumbnail, error);
 
   g_object_unref (thumb_file);
 
@@ -224,11 +233,12 @@ odf_thumbnailer_create_zip (GsfInfile*infile,
 
 static GdkPixbuf *
 odf_thumbnailer_create_msole (GsfInfile*infile,
-  TumblerThumbnail *thumbnail)
+  TumblerThumbnail *thumbnail,
+  GError  **error)
 {
   GsfInput   *summary;
   GsfDocMetaData *meta_data;
-  GError *error;
+  GError *err = NULL;
   GsfDocProp *thumb_doc;
   GdkPixbuf  *pixbuf = NULL;
   GValue const   *thumb_value;
@@ -237,19 +247,25 @@ odf_thumbnailer_create_msole (GsfInfile*infile,
   const guchar   *data;
 
   g_return_val_if_fail (GSF_IS_INFILE_MSOLE (infile), NULL);
+  g_return_val_if_fail (error == NULL || *error == NULL, NULL);
 
   /* try to find summary information stream */
   summary = gsf_infile_child_by_name (infile, "\05SummaryInformation");
   if (summary == NULL)
-return NULL;
+{
+  g_set_error (&err, TUMBLER_ERROR, TUMBLER_ERROR_NO_CONTENT,
+   _("Thumbnail could not be inferred from file contents"));
+  g_propagate_error (error, err);
+  return NULL;
+}
 
  

[Xfce4-commits] Fix typo (loser -> lower).

2011-10-27 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 1ae48784501f5095b5c66bc4316aa7ce8f950d6a (commit)
   from 6fe0c5715ab782e09fa700935bdb0a1aa6c85d90 (commit)

commit 1ae48784501f5095b5c66bc4316aa7ce8f950d6a
Author: Jannis Pohlmann 
Date:   Thu Oct 27 13:47:50 2011 +0200

Fix typo (loser -> lower).

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

diff --git a/settings-dialogs/xfwm4-settings.c 
b/settings-dialogs/xfwm4-settings.c
index aa7e886..e916439 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -254,7 +254,7 @@ static const ShortcutTemplate shortcut_values[] = {
   { N_("Stick window"), "stick_window_key", NULL },
   { N_("Raise window"), "raise_window_key", NULL },
   { N_("Lower window"), "lower_window_key", NULL },
-  { N_("Raise or loser window"), "raiselower_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 },
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Simplify the race fix. Failed name ownership implies already running.

2011-09-28 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 72525b63d3fb581e1077c10e4b7be61a171ffd01 (commit)
   from 776070012e3d5d2bff5a1b2a9e175ced7122f125 (commit)

commit 72525b63d3fb581e1077c10e4b7be61a171ffd01
Author: Jannis Pohlmann 
Date:   Wed Sep 28 23:30:56 2011 +0200

Simplify the race fix. Failed name ownership implies already running.

The only other results dbus_bus_request_name() returns are either not
possible or imply that the service is already provided by another
instance, so we don't have to treat DBUS_REQUEST_NAME_REPLY_EXISTS
special.

 tumblerd/main.c  |   28 ++--
 tumblerd/tumbler-cache-service.c |   28 ++--
 tumblerd/tumbler-manager.c   |   28 ++--
 tumblerd/tumbler-service.c   |   27 ++-
 4 files changed, 12 insertions(+), 99 deletions(-)

diff --git a/tumblerd/main.c b/tumblerd/main.c
index f79049b..d8e9876 100644
--- a/tumblerd/main.c
+++ b/tumblerd/main.c
@@ -65,7 +65,6 @@ main (intargc,
   TumblerService  *service;
   TumblerCacheService *cache_service;
   GMainLoop   *main_loop;
-  gboolean already_running = FALSE;
   GError  *error = NULL;
   GList   *providers;
   GList   *thumbnailers;
@@ -166,9 +165,6 @@ main (intargc,
   /* try to start the service and exit if that fails */
   if (!tumbler_cache_service_start (cache_service, &error))
 {
-  if (error->domain == DBUS_GERROR && error->code == 
DBUS_GERROR_ADDRESS_IN_USE)
-already_running = TRUE;
-
   g_warning (_("Failed to start the thumbnail cache service: %s"), 
error->message);
   g_error_free (error);
 
@@ -179,18 +175,13 @@ main (intargc,
 
   dbus_g_connection_unref (connection);
 
-  if (already_running)
-return EXIT_SUCCESS;
-  else
-return EXIT_FAILURE;
+  /* service already running, exit gracefully to not break clients */
+  return EXIT_SUCCESS;
 }
 
   /* try to start the service and exit if that fails */
   if (!tumbler_manager_start (manager, &error))
 {
-  if (error->domain == DBUS_GERROR && error->code == 
DBUS_GERROR_ADDRESS_IN_USE)
-already_running = TRUE;
-
   g_warning (_("Failed to start the thumbnailer manager: %s"), 
error->message);
   g_error_free (error);
 
@@ -201,18 +192,13 @@ main (intargc,
 
   dbus_g_connection_unref (connection);
 
-  if (already_running)
-return EXIT_SUCCESS;
-  else
-return EXIT_FAILURE;
+  /* service already running, exit gracefully to not break clients */
+  return EXIT_SUCCESS;
 }
 
   /* try to start the service and exit if that fails */
   if (!tumbler_service_start (service, &error))
 {
-  if (error->domain == DBUS_GERROR && error->code == 
DBUS_GERROR_ADDRESS_IN_USE)
-already_running = TRUE;
-
   g_warning (_("Failed to start the thumbnailer service: %s"), 
error->message);
   g_error_free (error);
 
@@ -223,10 +209,8 @@ main (intargc,
 
   dbus_g_connection_unref (connection);
 
-  if (already_running)
-return EXIT_SUCCESS;
-  else
-return EXIT_FAILURE;
+  /* service already running, exit gracefully to not break clients */
+  return EXIT_SUCCESS;
 }
 
   /* create a new main loop */
diff --git a/tumblerd/tumbler-cache-service.c b/tumblerd/tumbler-cache-service.c
index f6b2dc5..d9ecfe6 100644
--- a/tumblerd/tumbler-cache-service.c
+++ b/tumblerd/tumbler-cache-service.c
@@ -390,7 +390,6 @@ tumbler_cache_service_start (TumblerCacheService *service,
  GError **error)
 {
   DBusConnection *connection;
-  DBusError   dbus_error;
   gintresult;
 
   g_return_val_if_fail (TUMBLER_IS_CACHE_SERVICE (service), FALSE);
@@ -398,41 +397,18 @@ tumbler_cache_service_start (TumblerCacheService *service,
 
   g_mutex_lock (service->mutex);
 
-  /* initialize the D-Bus error */
-  dbus_error_init (&dbus_error);
-
   /* get the native D-Bus connection */
   connection = dbus_g_connection_get_connection (service->connection);
 
   /* request ownership for the cache interface */
   result = dbus_bus_request_name (connection, 
"org.freedesktop.thumbnails.Cache1", 
-  DBUS_NAME_FLAG_DO_NOT_QUEUE, &dbus_error);
+  DBUS_NAME_FLAG_DO_NOT_QUEUE, NULL);
 
   /* check if that failed */
-  if (result == DBUS_REQUEST_NAME_REPLY_EXISTS)
+  if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
 {
   if (error != NULL)
 {
-  g_set_error (error, DBUS_GERROR, DBUS_GERROR_ADDRESS_IN_USE,
-   _("Another thumbnail cache service is already 
running"));
-}

[Xfce4-commits] Fix ownership race conditions when started twice (bug #8001).

2011-09-28 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 776070012e3d5d2bff5a1b2a9e175ced7122f125 (commit)
   from aab140d868c1ebedbb04bbd65deddf94dc21787b (commit)

commit 776070012e3d5d2bff5a1b2a9e175ced7122f125
Author: Jannis Pohlmann 
Date:   Wed Sep 28 23:11:57 2011 +0200

Fix ownership race conditions when started twice (bug #8001).

It can happen that D-Bus activates tumblerd multiple times if the
activated instance doesn't bring up the service quickly enough. We need
to detect this in order to exit duplicate instances gracefully (exit
code 0). Exiting with an error code breaks clients.

For more information, see the following bugs:

  https://bugzilla.xfce.org/show_bug.cgi?id=8001
  https://bugs.freedesktop.org/show_bug.cgi?id=41233

 NEWS |1 +
 tumblerd/main.c  |   79 +-
 tumblerd/tumbler-cache-service.c |   32 ++-
 tumblerd/tumbler-manager.c   |   44 -
 tumblerd/tumbler-service.c   |   32 ++-
 5 files changed, 131 insertions(+), 57 deletions(-)

diff --git a/NEWS b/NEWS
index 48e3896..c93ec82 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 0.1.xx
 ==
 - Fix generation of video images by starting the pipeline (bug #7996).
+- Fix ownership race conditions when started twice (bug #8001).
 
 0.1.22
 ==
diff --git a/tumblerd/main.c b/tumblerd/main.c
index f2de4f0..f79049b 100644
--- a/tumblerd/main.c
+++ b/tumblerd/main.c
@@ -65,6 +65,7 @@ main (intargc,
   TumblerService  *service;
   TumblerCacheService *cache_service;
   GMainLoop   *main_loop;
+  gboolean already_running = FALSE;
   GError  *error = NULL;
   GList   *providers;
   GList   *thumbnailers;
@@ -99,22 +100,6 @@ main (intargc,
   /* create the lifecycle manager */
   lifecycle_manager = tumbler_lifecycle_manager_new ();
 
-  /* create the thumbnail cache service */
-  cache_service = tumbler_cache_service_new (connection, lifecycle_manager);
-
-  /* try to start the service and exit if that fails */
-  if (!tumbler_cache_service_start (cache_service, &error))
-{
-  g_warning (_("Failed to start the thumbnail cache service: %s"), 
error->message);
-  g_error_free (error);
-
-  g_object_unref (cache_service);
-
-  dbus_g_connection_unref (connection);
-
-  return EXIT_FAILURE;
-}
-
   /* create the thumbnailer registry */
   registry = tumbler_registry_new ();
 
@@ -152,6 +137,15 @@ main (intargc,
   /* update the URI schemes / MIME types supported information */
   tumbler_registry_update_supported (registry);
 
+  /* create the thumbnail cache service */
+  cache_service = tumbler_cache_service_new (connection, lifecycle_manager);
+
+  /* create the thumbnailer manager service */
+  manager = tumbler_manager_new (connection, lifecycle_manager, registry);
+
+  /* create the generic thumbnailer service */
+  service = tumbler_service_new (connection, lifecycle_manager, registry);
+
   /* try to load specialized thumbnailers and exit if that fails */
   if (!tumbler_registry_load (registry, &error))
 {
@@ -159,49 +153,80 @@ main (intargc,
  error->message);
   g_error_free (error);
 
-  g_object_unref (registry);
+  g_object_unref (service);
+  g_object_unref (manager);
   g_object_unref (cache_service);
+  g_object_unref (registry);
 
   dbus_g_connection_unref (connection);
 
   return EXIT_FAILURE;
 }
 
-  /* create the thumbnailer manager service */
-  manager = tumbler_manager_new (connection, lifecycle_manager, registry);
+  /* try to start the service and exit if that fails */
+  if (!tumbler_cache_service_start (cache_service, &error))
+{
+  if (error->domain == DBUS_GERROR && error->code == 
DBUS_GERROR_ADDRESS_IN_USE)
+already_running = TRUE;
+
+  g_warning (_("Failed to start the thumbnail cache service: %s"), 
error->message);
+  g_error_free (error);
+
+  g_object_unref (service);
+  g_object_unref (manager);
+  g_object_unref (cache_service);
+  g_object_unref (registry);
+
+  dbus_g_connection_unref (connection);
+
+  if (already_running)
+return EXIT_SUCCESS;
+  else
+return EXIT_FAILURE;
+}
 
   /* try to start the service and exit if that fails */
   if (!tumbler_manager_start (manager, &error))
 {
+  if (error->domain == DBUS_GERROR && error->code == 
DBUS_GERROR_ADDRESS_IN_USE)
+already_running = TRUE;
+
   g_warning (_("Failed to start the thumbnailer manager: %s"), 
error->message);
   g_error_free (error);
 
+  g_object_unref (service);
   g_object_unref (manager);
-  g_object_unref (registry);
   g_object_unref (cache_service);
+  g_object_un

[Xfce4-commits] Fix generation of video images by starting the pipeline (bug #7996).

2011-09-26 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to aab140d868c1ebedbb04bbd65deddf94dc21787b (commit)
   from cb25532c91f16fe82d5e4f19285a9dd2857e5274 (commit)

commit aab140d868c1ebedbb04bbd65deddf94dc21787b
Author: Jannis Pohlmann 
Date:   Mon Sep 26 19:28:51 2011 +0200

Fix generation of video images by starting the pipeline (bug #7996).

Patch provided by Sam Thursfield.

 NEWS |4 
 plugins/gst-thumbnailer/gst-helper.c |2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index 0ff1c1c..48e3896 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+0.1.xx
+==
+- Fix generation of video images by starting the pipeline (bug #7996).
+
 0.1.22
 ==
 - Add coding style documentation.
diff --git a/plugins/gst-thumbnailer/gst-helper.c 
b/plugins/gst-thumbnailer/gst-helper.c
index b8a29ab..dead043 100644
--- a/plugins/gst-thumbnailer/gst-helper.c
+++ b/plugins/gst-thumbnailer/gst-helper.c
@@ -154,6 +154,8 @@ gst_helper_convert_buffer_to_pixbuf (GstBuffer*buffer,
 
   bus = gst_element_get_bus (GST_ELEMENT (pipeline));
 
+  gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
+
   i = 0;
   msg = NULL;
   while (msg == NULL && i < 5)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Release 0.1.22!

2011-09-20 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to cb25532c91f16fe82d5e4f19285a9dd2857e5274 (commit)
   from ec8cb7a97b514da6393f0498482ec99815627f2a (commit)

commit cb25532c91f16fe82d5e4f19285a9dd2857e5274
Author: Jannis Pohlmann 
Date:   Wed Sep 21 00:49:48 2011 +0200

Release 0.1.22!

 AUTHORS  |2 +
 ChangeLog| 1127 ++
 NEWS |9 +-
 configure.ac |2 +-
 4 files changed, 1137 insertions(+), 3 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 30070c8..9c12c7b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,2 +1,4 @@
 Jannis Pohlmann 
 Philip Van Hoof 
+
+GStreamer video thumbnailer by Ross Burton 
diff --git a/ChangeLog b/ChangeLog
index 5416117..9f3ed26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,1130 @@
+commit ec8cb7a97b514da6393f0498482ec99815627f2a
+Author: Vincent Untz 
+Date:   Tue Sep 20 11:37:35 2011 +0200
+
+Do not use API removed from poppler >= 0.17
+
+Signed-off-by: Jannis Pohlmann 
+
+commit f4bec8435820113274fde0b6c69b1a364ea5b1d8
+Author: Seong-ho Cho 
+Date:   Mon Sep 12 22:35:09 2011 +0200
+
+l10n: Submission of Korean translation for tumbler.master
+
+New status: 50 messages complete with 0 fuzzies and 0 untranslated.
+
+Transmitted-via: Transifex (translations.xfce.org).
+
+commit 85df1724ade48ed9838880e9402945bd87526748
+Author: Pjotr Anon 
+Date:   Wed Sep 7 20:37:17 2011 +0200
+
+l10n: Updated Dutch (Flemish) (nl) translation to 100%
+
+New status: 50 messages complete with 0 fuzzies and 0 untranslated.
+
+Transmitted-via: Transifex (translations.xfce.org).
+
+commit dd5399fea3b544c9b676d1f339e6c736ab35e2a2
+Author: Cheng-Chia Tseng 
+Date:   Mon Sep 5 05:42:23 2011 +0200
+
+l10n: Updated Chinese (Taiwan) (zh_TW) translation to 100%
+
+New status: 50 messages complete with 0 fuzzies and 0 untranslated.
+
+Transmitted-via: Transifex (translations.xfce.org).
+
+commit 2a9b200efe603b6a7e627df97c497fd95649b8de
+Author: كريم أولاد الشلحة 
+Date:   Wed Aug 24 05:17:47 2011 +0200
+
+l10n: Updated Arabic (ar) translation to 100%
+
+New status: 50 messages complete with 0 fuzzies and 0 untranslated.
+
+Transmitted-via: Transifex (translations.xfce.org).
+
+commit dbb91a1baa6ac26ce72d502870dfc066d5b89c84
+Author: Praveen Illa 
+Date:   Mon Aug 22 21:57:00 2011 +0200
+
+l10n: Updates to Telugu translation
+
+New status: 34 messages complete with 0 fuzzies and 16 untranslated.
+
+Transmitted-via: Transifex (translations.xfce.org).
+
+commit 69d0e676488597b67a92e49d52eda952b1842107
+Author: Fabian Nowak 
+Date:   Mon Aug 22 20:18:30 2011 +0200
+
+l10n: Updated German (de) translation to 100%
+
+New status: 50 messages complete with 0 fuzzies and 0 untranslated.
+
+Transmitted-via: Transifex (translations.xfce.org).
+
+commit f5e3e50625e4bd2be480476263dfd58a3d4fa04a
+Author: Jérôme Guelfucci 
+Date:   Fri Aug 5 18:25:47 2011 +0200
+
+Rework French translation.
+
+Fix some errors, make the translation consistent and understandable.
+
+commit 5ef904d4ba77723c02353a0e67b79a42934207db
+Author: Mișu Moldovan 
+Date:   Sun Jul 31 12:08:40 2011 +0200
+
+l10n: Updated Romanian (ro) translation to 100%
+
+New status: 50 messages complete with 0 fuzzies and 0 untranslated.
+
+Transmitted-via: Transifex (translations.xfce.org).
+
+commit ede6d265c3f2acc689571a82c10aa62ece0790c3
+Author: Jérôme Guelfucci 
+Date:   Sat Jul 23 17:39:38 2011 +0200
+
+Fix unused but set variable.
+
+commit ec68b59028e21a6a84271515b71dc94f07e3b557
+Author: Andres Sanchez 
+Date:   Tue Jul 19 19:24:10 2011 +0200
+
+l10n: Updated Spanish (Castilian) (es) translation to 100%
+
+New status: 50 messages complete with 0 fuzzies and 0 untranslated.
+
+Transmitted-via: Transifex (translations.xfce.org).
+
+commit 384901b3cbd9e0982a1d0204b1050d695cdd
+Author: Tomáš Vadina 
+Date:   Mon Jul 18 08:34:11 2011 +0200
+
+l10n: New Slovak translation
+
+New status: 50 messages complete with 0 fuzzies and 0 untranslated.
+
+Transmitted-via: Transifex (translations.xfce.org).
+
+commit 5d63b263286f93c64d8e15b9bf1618ae7204adb9
+Author: Chipong Luo 
+Date:   Thu Jul 7 15:54:36 2011 +0200
+
+l10n: Updated Chinese (China) (zh_CN) translation to 100%
+
+New status: 50 messages complete with 0 fuzzies and 0 untranslated.
+
+Transmitted-via: Transifex (translations.xfce.org).
+
+commit 5843594783c3f5dc6b68e67d205721ffdb8c21a0
+Author: Chipong Luo 
+Date:   Thu Jul 7 15:36:12 2011 +0200
+
+l10n: Updated Chinese (China) (zh_CN) translation to 100%
+
+New status: 50 messages complete with 0 fuzzies and 0 untranslated.
+
+Transmitted-via: Transifex (translations.xfce.org).
+
+commit f703fd000f1a8943f3c4fd147614fa132825d84c
+Author: Bauzhan Muftakhidinov 
+Date:   Sat Jun 25 13:54:43 2011 +0200
+
+l10n: Updated Kazakh 

[Xfce4-commits] Creating annotated tag tumbler-0.1.22

2011-09-20 Thread Jannis Pohlmann
Updating annotated tag refs/tags/tumbler-0.1.22
 as new annotated tag
 to 067d119683e8f40cc3e88728c219ca4be4e22448 (tag)
   succeeds tumbler-0.1.21
  tagged by Jannis Pohlmann 
 on 2011-09-21 00:50 +0200

Akın Ömeroğlu (1):
  l10n: Updated Turkish (tr) translation to 89%

Andhika Padmawan (1):
  l10n: Updated Indonesian (id) translation to 100%

Andres Sanchez (1):
  l10n: Updated Spanish (Castilian) (es) translation to 100%

Bauzhan Muftakhidinov (2):
  l10n: Updated Kazakh (kk) translation to 100%
  l10n: Updated Kazakh (kk) translation to 100%

Cheng-Chia Tseng (2):
  l10n: Updated Chinese (Taiwan) (zh_TW) translation to 100%
  l10n: Updated Chinese (Taiwan) (zh_TW) translation to 100%

Chipong Luo (4):
  l10n: Updated Chinese (China) (zh_CN) translation to 100%
  l10n: Updated Chinese (China) (zh_CN) translation to 100%
  l10n: Updated Chinese (China) (zh_CN) translation to 100%
  l10n: Updated Chinese (China) (zh_CN) translation to 100%

Christoph Wickert (1):
  l10n: Updated German (de) translation to 96%

Cristian Marchi (2):
  l10n: Updated Italian (it) translation to 100%
  l10n: Updated Italian (it) translation to 100%

Daniel Nylander (1):
  l10n: Updated Swedish (sv) translation to 100%

Dmitrij Smirnov (1):
  l10n: Updated Russian (ru) translation to 100%

Dmitry Nikitin (1):
  l10n: Updated Ukrainian (uk) translation to 100%

Fabian Nowak (1):
  l10n: Updated German (de) translation to 100%

Gonzalo Lagos (2):
  l10n: Spanish (Castillian)(es) translation.
  l10n: Updated Spanish (Castilian) (es) translation to 100%

Harald Servat (1):
  l10n: Updated Catalan (Valencian) (ca) translation to 100%

Ilker DAGLI (1):
  l10n: Updated Turkish (tr) translation to 100%

Jannis Pohlmann (7):
  Add coding style document.
  Add information about loops to the coding style documentation.
  Make a few tiny whitespace/coding style adjustment.
  Avoid GdkPixbuf functions deprecated in poppler >= 0.17 (bug #7649).
  Remove unused but set variable in the gst-helper.
  Add missing source file to POTFILES.in.
  Release 0.1.22!

Jari Rahkonen (2):
  l10n: Updated Finnish (fi) translation to 100%
  l10n: Updated Finnish (fi) translation to 100%

Jérôme Guelfucci (2):
  Fix unused but set variable.
  Rework French translation.

Leandro Regueiro (1):
  l10n: Updated Galician (gl) translation to 100%

Masato Hashimoto (2):
  l10n: Updated Japanese (ja) translation to 100%
  l10n: Updated Japanese (ja) translation to 100%

Mișu Moldovan (1):
  l10n: Updated Romanian (ro) translation to 100%

Nick Schermer (3):
  Fix compiler error on Sun Studio.
  Drop some unused variables.
  l10n: Initial Dutch Translation.

Per Kongstad (3):
  l10n: Updated Danish (da) translation to 100%
  l10n: Updated Danish (da) translation to 100%
  l10n: Updated Danish (da) translation to 100%

Piarres Beobide (2):
  l10n: Updated Basque (eu) translation to 100%
  l10n: Updated Basque (eu) translation to 100%

Pjotr Anon (6):
  l10n: Updated Dutch (Flemish) (nl) translation to 100%
  l10n: Updated Dutch (Flemish) (nl) translation to 100%
  l10n: Updated Dutch (Flemish) (nl) translation to 100%
  l10n: Updated Dutch (Flemish) (nl) translation to 100%
  l10n: Updated Dutch (Flemish) (nl) translation to 100%
  l10n: Updated Dutch (Flemish) (nl) translation to 100%

Praveen Illa (1):
  l10n: Updates to Telugu translation

Ross Burton (1):
  Add GStreamer-based thumbnailer for video thumbnails

Seong-ho Cho (1):
  l10n: Submission of Korean translation for tumbler.master

Sergio Marques (2):
  l10n: Updated Portuguese (pt) translation to 100%
  l10n: Updated Portuguese (pt) translation to 100%

Sérgio Cipolla (2):
  l10n: Updated Portuguese (Brazilian) (pt_BR) translation to 100%
  l10n: Updated Portuguese (Brazilian) (pt_BR) translation to 100%

Tomáš Vadina (1):
  l10n: New Slovak translation

Vincent Untz (1):
  Do not use API removed from poppler >= 0.17

Yarema aka Knedlyk (2):
  l10n: Updated Ukrainian (uk) translation to 100%
  l10n: Updated Ukrainian (uk) translation to 100%

alpertekinalp (4):
  l10n: Updated Turkish (tr) translation to 45%
  l10n: Updated Turkish (tr) translation to 47%
  l10n: Updated Turkish (tr) translation to 56%
  l10n: Updated Turkish (tr) translation to 60%

necdetyucel (4):
  l10n: Updated Turkish (tr) translation to 60%
  l10n: Updated Turkish (tr) translation to 62%
  l10n: Updated Turkish (tr) translation to 70%
  l10n: Updated Turkish (tr) translation to 100%

كريم أولاد الشلحة (1):
  l10n: Updated Arabic (ar) translation to 100%

微 尘 (1):
  l10n: Updated Chinese (China) (zh_CN) translation to 100%

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org

[Xfce4-commits] Creating annotated tag thunar-1.2.3

2011-09-20 Thread Jannis Pohlmann
Updating annotated tag refs/tags/thunar-1.2.3
 as new annotated tag
 to 327fd354f0dbb26528ac3f17c7356e68cc0dccf9 (tag)
   succeeds thunar-1.2.2
  tagged by Jannis Pohlmann 
 on 2011-09-20 22:40 +0200

Alexandr Boltris (6):
  l10n: Updated Russian (ru) translation to 99%
  l10n: Updated Russian (ru) translation to 100%
  l10n: Updated Russian (ru) translation to 99%
  l10n: Updated Russian (ru) translation to 99%
  l10n: Updated Russian (ru) translation to 99%
  l10n: Updated Russian (ru) translation to 100%

Andreas Mueller (2):
  docs: On installation create relative paths in symlinks to images
  Fix segfaults in case icons are missing or not found (bug #7880).

Andres Sanchez (1):
  l10n: Updated Spanish (Castilian) (es) translation to 100%

Artem Zolochevskiy (2):
  l10n: Updated Russian (ru) translation to 99%
  l10n: Updated Russian (ru) translation to 99%

Bauzhan Muftakhidinov (1):
  l10n: Updated Kazakh (kk) translation to 100%

Chipong Luo (5):
  l10n: Updated Chinese (China) (zh_CN) translation to 100%
  l10n: Updated Chinese (China) (zh_CN) translation to 100%
  l10n: Updated Chinese (China) (zh_CN) translation to 100%
  l10n: Updated Chinese (China) (zh_CN) translation to 100%
  l10n: Updated Chinese (China) (zh_CN) translation to 100%

Cristian Marchi (1):
  l10n: Updated Italian (it) translation to 100%

Jannis Pohlmann (11):
  Post-release version bump.
  Revert "Speed up initial start by adding the Network item later (bug 
#7373)."
  Revert "Fix crash when opening a mountable drive with no media."
  Fix crash when opening a drive with no media (bugs #7308 and #7774).
  Fix a compiler warning.
  Add missing NEWS entry.
  Allow exec bit of MS-DOS executables and MSI to be changed (bug #3545).
  Prevent falling back to an unexpected locale (bug #4746).
  Show translated names of desktop files (bug #7393).
  l10n: Updated Chinese (China) (zh_CN) translation to 100%
  Release Thunar 1.2.3!

Mohd. Nadzrin Sapari (1):
  l10n: Updates to Malay translation

Piarres Beobide (1):
  l10n: Updated Basque (eu) translation to 100%

Pjotr Anon (7):
  l10n: Updated Dutch (Flemish) (nl) translation to 100%
  l10n: Updated Dutch (Flemish) (nl) translation to 100%
  l10n: Updated Dutch (Flemish) (nl) translation to 100%
  l10n: Updated Dutch (Flemish) (nl) translation to 100%
  l10n: Updated Dutch (Flemish) (nl) translation to 100%
  l10n: Updated Dutch (Flemish) (nl) translation to 100%
  l10n: Updated Dutch (Flemish) (nl) translation to 100%

Praveen Illa (2):
  l10n: Updates to Telugu Translation
  l10n: Updated Telugu (te) translation to 75%

Seong-ho Cho (6):
  l10n: Updated Korean (ko) translation to 92%
  l10n: Updated Korean (ko) translation to 94%
  l10n: Updated Korean (ko) translation to 97%
  l10n: Updated Korean (ko) translation to 99%
  l10n: Updated Korean (ko) translation to 100%
  l10n: Updated Korean (ko) translation to 100%

Tomáš Vadina (6):
  l10n: Updated Slovak (sk) translation to 100%
  l10n: Updated Slovak (sk) translation to 100%
  l10n: Updated Slovak (sk) translation to 100%
  l10n: Updated Slovak (sk) translation to 100%
  l10n: Updated Slovak (sk) translation to 100%
  l10n: Updated Slovak (sk) translation to 100%

Yves-Alexis Perez (1):
  Use glib functions for get/set cwd (bug #7522).

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


[Xfce4-commits] Post-release version bump.

2011-09-20 Thread Jannis Pohlmann
Updating branch refs/heads/xfce-4.8
 to 7bd68ba069f71caf19ec00b6cbbf3c30e93259a6 (commit)
   from 2edc9796764b9384e94a3fce3377d271b4f0330c (commit)

commit 7bd68ba069f71caf19ec00b6cbbf3c30e93259a6
Author: Jannis Pohlmann 
Date:   Tue Sep 20 22:41:33 2011 +0200

Post-release version bump.

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

diff --git a/NEWS b/NEWS
index 40e2d9e..d290ce3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+1.2.x
+=
+
 1.2.3
 =
 - Use glib functions for get/set cwd (bug #7522).
diff --git a/configure.in.in b/configure.in.in
index a41f2f8..cde7568 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -28,7 +28,7 @@ m4_define([thunar_version_minor], [2])
 m4_define([thunar_version_micro], [3])
 m4_define([thunar_version_nano], [])
 m4_define([thunar_version_build], [@REVISION@])
-m4_define([thunar_version_tag], [])
+m4_define([thunar_version_tag], [git])
 m4_define([thunar_version], 
[thunar_version_major().thunar_version_minor().thunar_version_micro()ifelse(thunar_version_nano(),
 [], [], [.thunar_version_nano()])ifelse(thunar_version_tag(), [git], 
[thunar_version_tag()-thunar_version_build()], [thunar_version_tag()])])
 
 dnl ***
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Release Thunar 1.2.3!

2011-09-20 Thread Jannis Pohlmann
Updating branch refs/heads/xfce-4.8
 to 2edc9796764b9384e94a3fce3377d271b4f0330c (commit)
   from 9737dc929d182b8a0353571c4b82532a4e592bf8 (commit)

commit 2edc9796764b9384e94a3fce3377d271b4f0330c
Author: Jannis Pohlmann 
Date:   Tue Sep 20 22:40:41 2011 +0200

Release Thunar 1.2.3!

 NEWS|6 +-
 configure.in.in |4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index a759046..40e2d9e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,9 @@
-1.2.x
+1.2.3
 =
 - Use glib functions for get/set cwd (bug #7522).
 - Revert "Speed up initial start by loading the network item later
   (bug #7373)."
+- Docs: On installation create relative paths in symlinks to images.
 - Revert "Fix crash when opening a mountable drive with no media 
   (bug #7308)."
 - Fix crash when opening a mountable drive with no media (bug #7308)
@@ -15,6 +16,9 @@
   Patch by Martin Jürgens and Mark Trompell.
 - Show translated names of desktop files (bug #7393).
   Fix by Lionel Le Folgoc.
+- Translation updates: Basque, Chinese (China), Dutch (Flemish),
+  Italian, Kazakh, Korean, Malay, Russian, Slovak, Spanish (Castilian),
+  Telugu.
 
 1.2.2
 =
diff --git a/configure.in.in b/configure.in.in
index 9ee36ee..a41f2f8 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -25,10 +25,10 @@ m4_define([thunarx_verinfo], [0:0:0])
 m4_define([thunarx_version_api], [2])
 m4_define([thunar_version_major], [1])
 m4_define([thunar_version_minor], [2])
-m4_define([thunar_version_micro], [2])
+m4_define([thunar_version_micro], [3])
 m4_define([thunar_version_nano], [])
 m4_define([thunar_version_build], [@REVISION@])
-m4_define([thunar_version_tag], [git])
+m4_define([thunar_version_tag], [])
 m4_define([thunar_version], 
[thunar_version_major().thunar_version_minor().thunar_version_micro()ifelse(thunar_version_nano(),
 [], [], [.thunar_version_nano()])ifelse(thunar_version_tag(), [git], 
[thunar_version_tag()-thunar_version_build()], [thunar_version_tag()])])
 
 dnl ***
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Do not use API removed from poppler >= 0.17

2011-09-20 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to ec8cb7a97b514da6393f0498482ec99815627f2a (commit)
   from f4bec8435820113274fde0b6c69b1a364ea5b1d8 (commit)

commit ec8cb7a97b514da6393f0498482ec99815627f2a
Author: Vincent Untz 
Date:   Tue Sep 20 11:37:35 2011 +0200

Do not use API removed from poppler >= 0.17

Signed-off-by: Jannis Pohlmann 

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

diff --git a/plugins/poppler-thumbnailer/poppler-thumbnailer.c 
b/plugins/poppler-thumbnailer/poppler-thumbnailer.c
index 7769273..3cb70cb 100644
--- a/plugins/poppler-thumbnailer/poppler-thumbnailer.c
+++ b/plugins/poppler-thumbnailer/poppler-thumbnailer.c
@@ -241,6 +241,7 @@ poppler_thumbnailer_create (TumblerAbstractThumbnailer 
*thumbnailer,
   PopplerDocument*document;
   PopplerPage*page;
   const gchar*uri;
+  cairo_surface_t*surface;
   GdkPixbuf  *source_pixbuf;
   GdkPixbuf  *pixbuf;
   GError *error = NULL;
@@ -326,9 +327,17 @@ poppler_thumbnailer_create (TumblerAbstractThumbnailer 
*thumbnailer,
   flavor = tumbler_thumbnail_get_flavor (thumbnail);
 
   /* try to extract the embedded thumbnail */
-  source_pixbuf = poppler_page_get_thumbnail_pixbuf (page);
+  surface = poppler_page_get_thumbnail (page);
 
-  if (source_pixbuf == NULL)
+  if (surface != NULL)
+{
+  source_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
+  cairo_image_surface_get_width (surface),
+  cairo_image_surface_get_height 
(surface));
+  copy_surface_to_pixbuf (surface, source_pixbuf);
+  cairo_surface_destroy (surface);
+}
+  else
 {
   /* fall back to rendering the page ourselves */
   poppler_page_get_size (page, &page_width, &page_height);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Show translated names of desktop files (bug #7393).

2011-09-19 Thread Jannis Pohlmann
Updating branch refs/heads/xfce-4.8
 to 5e3b25c4020d8b2ba8acebc748e873316c87885f (commit)
   from 970a5fdc1fa28524a085fe678bb0550f532f8d29 (commit)

commit 5e3b25c4020d8b2ba8acebc748e873316c87885f
Author: Jannis Pohlmann 
Date:   Mon Sep 19 15:51:41 2011 +0200

Show translated names of desktop files (bug #7393).

Fix by Lionel Le Folgoc.

 NEWS |2 ++
 thunar/thunar-file.c |8 
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index bdb764a..a759046 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@
   (bug #3545).
 - Prevent falling back to an unexpected locale (bug #4746).
   Patch by Martin Jürgens and Mark Trompell.
+- Show translated names of desktop files (bug #7393).
+  Fix by Lionel Le Folgoc.
 
 1.2.2
 =
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 12e1556..909da25 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -825,10 +825,10 @@ thunar_file_load (ThunarFile   *file,
 
   /* read the display name from the .desktop file (will be overwritten 
later
* if it's undefined here) */
-  file->display_name = g_key_file_get_string (key_file,
-  G_KEY_FILE_DESKTOP_GROUP,
-  
G_KEY_FILE_DESKTOP_KEY_NAME,
-  NULL);
+  file->display_name = g_key_file_get_locale_string (key_file,
+ 
G_KEY_FILE_DESKTOP_GROUP,
+ 
G_KEY_FILE_DESKTOP_KEY_NAME,
+ NULL, NULL);
   
   /* check if we have a display name now */
   if (file->display_name != NULL)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Show translated names of desktop files (bug #7393).

2011-09-19 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to fd2b39686f53fcdb1cf37bb9b7a89a2658dc2f67 (commit)
   from 1c4c7f92f30d50712d57c9ab4ed56e23c30f7255 (commit)

commit fd2b39686f53fcdb1cf37bb9b7a89a2658dc2f67
Author: Jannis Pohlmann 
Date:   Mon Sep 19 15:51:41 2011 +0200

Show translated names of desktop files (bug #7393).

Fix by Lionel Le Folgoc.

 NEWS |2 ++
 thunar/thunar-file.c |8 
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index cfbcae4..7c1609e 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,8 @@
   (bug #3545).
 - Prevent falling back to an unexpected locale (bug #4746).
   Patch by Martin Jürgens and Mark Trompell.
+- Show translated names of desktop files (bug #7393).
+  Fix by Lionel Le Folgoc.
 
 1.3.0
 =
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 2731ca9..9e5393c 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -825,10 +825,10 @@ thunar_file_load (ThunarFile   *file,
 
   /* read the display name from the .desktop file (will be overwritten 
later
* if it's undefined here) */
-  file->display_name = g_key_file_get_string (key_file,
-  G_KEY_FILE_DESKTOP_GROUP,
-  
G_KEY_FILE_DESKTOP_KEY_NAME,
-  NULL);
+  file->display_name = g_key_file_get_locale_string (key_file,
+ 
G_KEY_FILE_DESKTOP_GROUP,
+ 
G_KEY_FILE_DESKTOP_KEY_NAME,
+ NULL, NULL);
   
   /* check if we have a display name now */
   if (file->display_name != NULL)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Prevent falling back to an unexpected locale (bug #4746).

2011-09-19 Thread Jannis Pohlmann
Updating branch refs/heads/xfce-4.8
 to 970a5fdc1fa28524a085fe678bb0550f532f8d29 (commit)
   from 57bf9e5088cf7ac6e7989541889544637e20a89d (commit)

commit 970a5fdc1fa28524a085fe678bb0550f532f8d29
Author: Jannis Pohlmann 
Date:   Mon Sep 19 15:11:01 2011 +0200

Prevent falling back to an unexpected locale (bug #4746).

setlocale() returns a pointer to its internal locale string, so if we
want to store the returned string for later use, we need to duplicate
it.

Patch by Martin Jürgens and Mark
Trompell.

 NEWS  |2 ++
 plugins/thunar-uca/thunar-uca-model.c |5 +++--
 thunar/thunar-shortcuts-model.c   |6 +++---
 thunar/thunar-window.c|3 ++-
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/NEWS b/NEWS
index fa93294..bdb764a 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,8 @@
 - Fix segfaults in case icons are missing or not found (bug #7880).
 - Allow exec bit of MS-DOS executables and MSI to be changed 
   (bug #3545).
+- Prevent falling back to an unexpected locale (bug #4746).
+  Patch by Martin Jürgens and Mark Trompell.
 
 1.2.2
 =
diff --git a/plugins/thunar-uca/thunar-uca-model.c 
b/plugins/thunar-uca/thunar-uca-model.c
index d5cb8e4..1f54bb1 100644
--- a/plugins/thunar-uca/thunar-uca-model.c
+++ b/plugins/thunar-uca/thunar-uca-model.c
@@ -176,7 +176,7 @@ typedef struct
 {
   ParserStack*stack;
   ThunarUcaModel *model;
-  const gchar*locale;
+  gchar  *locale;
   GString*name;
   gbooleanname_use;
   guint   name_match;
@@ -553,7 +553,7 @@ thunar_uca_model_load_from_file (ThunarUcaModel *uca_model,
   /* initialize the parser */
   parser.stack = xfce_stack_new (ParserStack);
   parser.model = uca_model;
-  parser.locale = setlocale (LC_MESSAGES, NULL);
+  parser.locale = g_strdup (setlocale (LC_MESSAGES, NULL));
   parser.name = g_string_new (NULL);
   parser.icon = g_string_new (NULL);
   parser.command = g_string_new (NULL);
@@ -574,6 +574,7 @@ thunar_uca_model_load_from_file (ThunarUcaModel *uca_model,
   g_string_free (parser.command, TRUE);
   g_string_free (parser.icon, TRUE);
   g_string_free (parser.name, TRUE);
+  g_free (parser.locale);
   xfce_stack_free (parser.stack);
   g_free (content);
 
diff --git a/thunar/thunar-shortcuts-model.c b/thunar/thunar-shortcuts-model.c
index 2aae575..8944461 100644
--- a/thunar/thunar-shortcuts-model.c
+++ b/thunar/thunar-shortcuts-model.c
@@ -869,7 +869,7 @@ thunar_shortcuts_model_load (ThunarShortcutsModel *model)
 {
   /* ~/.gtk-bookmarks wasn't there or it was unreadable.
* here we recreate it with some useful xdg user special dirs */
-  const char *old_locale = NULL;
+  gchar *old_locale = NULL;
   gchar *locale  = NULL;
 
   bindtextdomain (XDG_USER_DIRS_PACKAGE, PACKAGE_LOCALE_DIR);
@@ -878,7 +878,7 @@ thunar_shortcuts_model_load (ThunarShortcutsModel *model)
 #endif /* HAVE_BIND_TEXTDOMAIN_CODESET */
 
   /* save the old locale */
-  old_locale = setlocale (LC_MESSAGES, NULL);
+  old_locale = g_strdup(setlocale (LC_MESSAGES, NULL));
 
   /* set the new locale */
   locale = _thunar_get_xdg_user_dirs_locale ();
@@ -938,7 +938,7 @@ thunar_shortcuts_model_load (ThunarShortcutsModel *model)
 
   /* restore the old locale */
   setlocale (LC_MESSAGES, old_locale);
-
+  g_free(old_locale);
   gtk_tree_path_free (path);
 
   /* we try to save the obtained new model */
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index fe76be6..33eaa1b 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -618,7 +618,7 @@ thunar_window_setup_user_dir_menu_entries (ThunarWindow 
*window)
 #endif /* HAVE_BIND_TEXTDOMAIN_CODESET */
 
   /* save the old locale */
-  old_locale = setlocale (LC_MESSAGES, NULL);
+  old_locale = g_strdup(setlocale (LC_MESSAGES, NULL));
 
   /* set the new locale */
   locale = _thunar_get_xdg_user_dirs_locale ();
@@ -656,6 +656,7 @@ thunar_window_setup_user_dir_menu_entries (ThunarWindow 
*window)
   g_object_unref (home_dir);
 
   setlocale (LC_MESSAGES, old_locale);
+  g_free (old_locale);
 }
 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Prevent falling back to an unexpected locale (bug #4746).

2011-09-19 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 594aa7b5be815a84f31a12d8ec49052865734855 (commit)
   from cfab3c6a3b7ad714fc3fe67e84bf0d3b1fc6d4b1 (commit)

commit 594aa7b5be815a84f31a12d8ec49052865734855
Author: Jannis Pohlmann 
Date:   Mon Sep 19 15:11:01 2011 +0200

Prevent falling back to an unexpected locale (bug #4746).

setlocale() returns a pointer to its internal locale string, so if we
want to store the returned string for later use, we need to duplicate
it.

Patch by Martin Jürgens and Mark
Trompell.

 plugins/thunar-uca/thunar-uca-model.c |5 +++--
 thunar/thunar-shortcuts-model.c   |6 +++---
 thunar/thunar-window.c|3 ++-
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/plugins/thunar-uca/thunar-uca-model.c 
b/plugins/thunar-uca/thunar-uca-model.c
index d5cb8e4..1f54bb1 100644
--- a/plugins/thunar-uca/thunar-uca-model.c
+++ b/plugins/thunar-uca/thunar-uca-model.c
@@ -176,7 +176,7 @@ typedef struct
 {
   ParserStack*stack;
   ThunarUcaModel *model;
-  const gchar*locale;
+  gchar  *locale;
   GString*name;
   gbooleanname_use;
   guint   name_match;
@@ -553,7 +553,7 @@ thunar_uca_model_load_from_file (ThunarUcaModel *uca_model,
   /* initialize the parser */
   parser.stack = xfce_stack_new (ParserStack);
   parser.model = uca_model;
-  parser.locale = setlocale (LC_MESSAGES, NULL);
+  parser.locale = g_strdup (setlocale (LC_MESSAGES, NULL));
   parser.name = g_string_new (NULL);
   parser.icon = g_string_new (NULL);
   parser.command = g_string_new (NULL);
@@ -574,6 +574,7 @@ thunar_uca_model_load_from_file (ThunarUcaModel *uca_model,
   g_string_free (parser.command, TRUE);
   g_string_free (parser.icon, TRUE);
   g_string_free (parser.name, TRUE);
+  g_free (parser.locale);
   xfce_stack_free (parser.stack);
   g_free (content);
 
diff --git a/thunar/thunar-shortcuts-model.c b/thunar/thunar-shortcuts-model.c
index 2aae575..8944461 100644
--- a/thunar/thunar-shortcuts-model.c
+++ b/thunar/thunar-shortcuts-model.c
@@ -869,7 +869,7 @@ thunar_shortcuts_model_load (ThunarShortcutsModel *model)
 {
   /* ~/.gtk-bookmarks wasn't there or it was unreadable.
* here we recreate it with some useful xdg user special dirs */
-  const char *old_locale = NULL;
+  gchar *old_locale = NULL;
   gchar *locale  = NULL;
 
   bindtextdomain (XDG_USER_DIRS_PACKAGE, PACKAGE_LOCALE_DIR);
@@ -878,7 +878,7 @@ thunar_shortcuts_model_load (ThunarShortcutsModel *model)
 #endif /* HAVE_BIND_TEXTDOMAIN_CODESET */
 
   /* save the old locale */
-  old_locale = setlocale (LC_MESSAGES, NULL);
+  old_locale = g_strdup(setlocale (LC_MESSAGES, NULL));
 
   /* set the new locale */
   locale = _thunar_get_xdg_user_dirs_locale ();
@@ -938,7 +938,7 @@ thunar_shortcuts_model_load (ThunarShortcutsModel *model)
 
   /* restore the old locale */
   setlocale (LC_MESSAGES, old_locale);
-
+  g_free(old_locale);
   gtk_tree_path_free (path);
 
   /* we try to save the obtained new model */
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index a6375c2..a42d982 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -618,7 +618,7 @@ thunar_window_setup_user_dir_menu_entries (ThunarWindow 
*window)
 #endif /* HAVE_BIND_TEXTDOMAIN_CODESET */
 
   /* save the old locale */
-  old_locale = setlocale (LC_MESSAGES, NULL);
+  old_locale = g_strdup(setlocale (LC_MESSAGES, NULL));
 
   /* set the new locale */
   locale = _thunar_get_xdg_user_dirs_locale ();
@@ -656,6 +656,7 @@ thunar_window_setup_user_dir_menu_entries (ThunarWindow 
*window)
   g_object_unref (home_dir);
 
   setlocale (LC_MESSAGES, old_locale);
+  g_free (old_locale);
 }
 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Add missing NEWS entry.

2011-09-19 Thread Jannis Pohlmann
Updating branch refs/heads/master
 to 1c4c7f92f30d50712d57c9ab4ed56e23c30f7255 (commit)
   from 594aa7b5be815a84f31a12d8ec49052865734855 (commit)

commit 1c4c7f92f30d50712d57c9ab4ed56e23c30f7255
Author: Jannis Pohlmann 
Date:   Mon Sep 19 15:17:26 2011 +0200

Add missing NEWS entry.

Sigh... I forget this too often.

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

diff --git a/NEWS b/NEWS
index 104bccd..cfbcae4 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,8 @@
 - Fix segfaults in case icons are missing or not found (bug #7880).
 - Allow exec bit of MS-DOS executables and MSI to be changed 
   (bug #3545).
+- Prevent falling back to an unexpected locale (bug #4746).
+  Patch by Martin Jürgens and Mark Trompell.
 
 1.3.0
 =
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Add missing NEWS entry.

2011-09-16 Thread Jannis Pohlmann
Updating branch refs/heads/xfce-4.8
 to 7085af8f93cccf1122b81e4cf82f4eb9a91e80b5 (commit)
   from 1ea7ededfe7fe642ba3ee7e80e99606f71003b40 (commit)

commit 7085af8f93cccf1122b81e4cf82f4eb9a91e80b5
Author: Jannis Pohlmann 
Date:   Wed Sep 14 22:28:01 2011 +0200

Add missing NEWS entry.

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

diff --git a/NEWS b/NEWS
index 6c3e661..3f3b664 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@
 - Fix crash when opening a mountable drive with no media (bug #7308)
   in a way that does not break SMB shares (#bug 7774).
   Patches by Ambroz Bizjak and Axel Sommerfeldt.
+- Fix segfaults in case icons are missing or not found (bug #7880).
 
 1.2.2
 =
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix a compiler warning.

2011-09-16 Thread Jannis Pohlmann
Updating branch refs/heads/xfce-4.8
 to 1ea7ededfe7fe642ba3ee7e80e99606f71003b40 (commit)
   from a9a495c31aee0b171807b777b635a480692c6ce7 (commit)

commit 1ea7ededfe7fe642ba3ee7e80e99606f71003b40
Author: Jannis Pohlmann 
Date:   Wed Sep 14 22:26:53 2011 +0200

Fix a compiler warning.

 thunar/thunar-transfer-job.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/thunar/thunar-transfer-job.c b/thunar/thunar-transfer-job.c
index 209e6b8..4cbd89c 100644
--- a/thunar/thunar-transfer-job.c
+++ b/thunar/thunar-transfer-job.c
@@ -671,6 +671,8 @@ thunar_transfer_job_execute (ExoJob  *job,
   /* check if the parent exists */
   if (target_parent != NULL)
 parent_exists = g_file_query_exists (target_parent, 
exo_job_get_cancellable (job));
+  else
+parent_exists = FALSE;
 
   /* abort on cancellation */
   if (exo_job_set_error_if_cancelled (job, &err))
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Allow exec bit of MS-DOS executables and MSI to be changed (bug #3545).

2011-09-16 Thread Jannis Pohlmann
Updating branch refs/heads/xfce-4.8
 to 57bf9e5088cf7ac6e7989541889544637e20a89d (commit)
   from 7085af8f93cccf1122b81e4cf82f4eb9a91e80b5 (commit)

commit 57bf9e5088cf7ac6e7989541889544637e20a89d
Author: Jannis Pohlmann 
Date:   Sat Sep 17 01:08:02 2011 +0200

Allow exec bit of MS-DOS executables and MSI to be changed (bug #3545).

Patch by Alex Henrie.

 NEWS|2 ++
 thunar/thunar-permissions-chooser.c |4 +++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 3f3b664..fa93294 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@
   in a way that does not break SMB shares (#bug 7774).
   Patches by Ambroz Bizjak and Axel Sommerfeldt.
 - Fix segfaults in case icons are missing or not found (bug #7880).
+- Allow exec bit of MS-DOS executables and MSI to be changed 
+  (bug #3545).
 
 1.2.2
 =
diff --git a/thunar/thunar-permissions-chooser.c 
b/thunar/thunar-permissions-chooser.c
index 7e26dd0..576010f 100644
--- a/thunar/thunar-permissions-chooser.c
+++ b/thunar/thunar-permissions-chooser.c
@@ -867,7 +867,9 @@ thunar_permissions_chooser_file_changed 
(ThunarPermissionsChooser *chooser,
   g_signal_handlers_block_by_func (G_OBJECT (chooser->program_button), 
thunar_permissions_chooser_program_toggled, chooser);
   g_object_set (G_OBJECT (chooser->program_button), "visible", 
thunar_file_is_regular (file)
   && (thunarx_file_info_has_mime_type (THUNARX_FILE_INFO (file), 
"application/x-executable")
-   || thunarx_file_info_has_mime_type (THUNARX_FILE_INFO (file), 
"application/x-shellscript")), NULL);
+   || thunarx_file_info_has_mime_type (THUNARX_FILE_INFO (file), 
"application/x-shellscript")
+   || thunarx_file_info_has_mime_type (THUNARX_FILE_INFO (file), 
"application/x-ms-dos-executable")
+   || thunarx_file_info_has_mime_type (THUNARX_FILE_INFO (file), 
"application/x-msi")), NULL);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (chooser->program_button), 
(mode & 0111) != 0);
   g_signal_handlers_unblock_by_func (G_OBJECT (chooser->program_button), 
thunar_permissions_chooser_program_toggled, chooser);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix segfaults in case icons are missing or not found (bug #7880).

2011-09-16 Thread Jannis Pohlmann
Updating branch refs/heads/xfce-4.8
 to a9a495c31aee0b171807b777b635a480692c6ce7 (commit)
   from 2b29bae837016a06c8ee29da44a9486b0909da19 (commit)

commit a9a495c31aee0b171807b777b635a480692c6ce7
Author: Andreas Mueller 
Date:   Thu Aug 11 10:00:33 2011 +0200

Fix segfaults in case icons are missing or not found (bug #7880).

Signed-off-by: Jannis Pohlmann 

 thunar/thunar-location-button.c |7 +--
 thunar/thunar-window.c  |   13 +
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/thunar/thunar-location-button.c b/thunar/thunar-location-button.c
index 49be1f4..a942d3b 100644
--- a/thunar/thunar-location-button.c
+++ b/thunar/thunar-location-button.c
@@ -462,9 +462,12 @@ thunar_location_button_file_changed (ThunarLocationButton 
*location_button,
   /* update the icon for the image */
   icon_factory = thunar_icon_factory_get_for_icon_theme (icon_theme);
   icon = thunar_icon_factory_load_file_icon (icon_factory, file, 
location_button->file_icon_state, size);
-  gtk_image_set_from_pixbuf (GTK_IMAGE (location_button->image), icon);
+  if (G_LIKELY (icon != NULL))
+{
+  gtk_image_set_from_pixbuf (GTK_IMAGE (location_button->image), icon);
+  g_object_unref (G_OBJECT (icon));
+}
   g_object_unref (G_OBJECT (icon_factory));
-  g_object_unref (G_OBJECT (icon));
 
   /* show the image widget */
   gtk_widget_show (location_button->image);
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index 4735b3b..fe76be6 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -2410,13 +2410,18 @@ thunar_window_current_directory_changed (ThunarFile   
*current_directory,
   gtk_action_set_sensitive (action, (thunar_file_get_item_count 
(current_directory) > 0));
   gtk_action_set_visible (action, (thunar_file_is_root (current_directory) && 
thunar_file_is_trashed (current_directory)));
 
-  /* set window title and icon */
+  /* set window title */
   title = g_strdup_printf ("%s - %s", thunar_file_get_display_name 
(current_directory), _("File Manager"));
-  icon = thunar_icon_factory_load_file_icon (window->icon_factory, 
current_directory, THUNAR_FILE_ICON_STATE_DEFAULT, 48);
   gtk_window_set_title (GTK_WINDOW (window), title);
-  gtk_window_set_icon (GTK_WINDOW (window), icon);
-  g_object_unref (G_OBJECT (icon));
   g_free (title);
+
+  /* set window icon */
+  icon = thunar_icon_factory_load_file_icon (window->icon_factory, 
current_directory, THUNAR_FILE_ICON_STATE_DEFAULT, 48);
+  if (G_LIKELY (icon != NULL))
+{
+  gtk_window_set_icon (GTK_WINDOW (window), icon);
+  g_object_unref (G_OBJECT (icon));
+}
 }
 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


  1   2   3   4   5   6   7   8   9   10   >