From ongardie at xfce.org Wed Jul 2 23:25:15 2008 From: ongardie at xfce.org (Diego Ongaro) Date: Wed, 2 Jul 2008 21:25:15 +0000 (UTC) Subject: [Goodies-commits] r5021 - xfce4-datetime-plugin/trunk Message-ID: <20080702212516.02207F29E0@mocha.foo-projects.org> Author: ongardie Date: 2008-07-02 21:25:15 +0000 (Wed, 02 Jul 2008) New Revision: 5021 Modified: xfce4-datetime-plugin/trunk/INSTALL Log: autogenerated INSTALL Modified: xfce4-datetime-plugin/trunk/INSTALL =================================================================== --- xfce4-datetime-plugin/trunk/INSTALL 2008-06-30 20:48:53 UTC (rev 5020) +++ xfce4-datetime-plugin/trunk/INSTALL 2008-07-02 21:25:15 UTC (rev 5021) @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -10,7 +10,10 @@ Basic Installation ================== -These are generic installation instructions. +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -23,9 +26,9 @@ It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail @@ -35,20 +38,17 @@ may remove or edit it. The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. @@ -67,6 +67,9 @@ all sorts of other programs in order to regenerate files that came with the distribution. + 6. Often, you can also type `make uninstall' to remove the installed + files again. + Compilers and Options ===================== @@ -78,7 +81,7 @@ by setting variables in the command line or in the environment. Here is an example: - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. @@ -87,17 +90,15 @@ You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. Installation Names ================== @@ -190,12 +191,12 @@ ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: +overridden in the site shell script). - /bin/bash ./configure CONFIG_SHELL=/bin/bash +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== From ongardie at xfce.org Wed Jul 2 23:25:20 2008 From: ongardie at xfce.org (Diego Ongaro) Date: Wed, 2 Jul 2008 21:25:20 +0000 (UTC) Subject: [Goodies-commits] r5022 - in xfce4-datetime-plugin/trunk: . panel-plugin Message-ID: <20080702212520.A390FF29E0@mocha.foo-projects.org> Author: ongardie Date: 2008-07-02 21:25:20 +0000 (Wed, 02 Jul 2008) New Revision: 5022 Modified: xfce4-datetime-plugin/trunk/ChangeLog xfce4-datetime-plugin/trunk/panel-plugin/datetime.h Log: Disable tooltips for now (Bug #4141) Modified: xfce4-datetime-plugin/trunk/ChangeLog =================================================================== --- xfce4-datetime-plugin/trunk/ChangeLog 2008-07-02 21:25:15 UTC (rev 5021) +++ xfce4-datetime-plugin/trunk/ChangeLog 2008-07-02 21:25:20 UTC (rev 5022) @@ -1,3 +1,7 @@ +2008-07-02 Diego Ongaro + + * panel-plugin/datetime.h: Disable tooltips for now (Bug #4141) + 2008-06-27 Diego Ongaro * configure.in.in: Drop unused dependency on dbus, update maintainer Modified: xfce4-datetime-plugin/trunk/panel-plugin/datetime.h =================================================================== --- xfce4-datetime-plugin/trunk/panel-plugin/datetime.h 2008-07-02 21:25:15 UTC (rev 5021) +++ xfce4-datetime-plugin/trunk/panel-plugin/datetime.h 2008-07-02 21:25:20 UTC (rev 5022) @@ -22,7 +22,9 @@ #ifndef DATETIME_H #define DATETIME_H -#define USE_GTK_TOOLTIP_API GTK_CHECK_VERSION(2,12,0) +#define I_CAN_HAS_BUGGY_TULTIPZ 0 +#define USE_GTK_TOOLTIP_API (I_CAN_HAS_BUGGY_TULTIPZ && \ + GTK_CHECK_VERSION(2,12,0)) /* enums */ enum { From ongardie at xfce.org Wed Jul 2 23:25:25 2008 From: ongardie at xfce.org (Diego Ongaro) Date: Wed, 2 Jul 2008 21:25:25 +0000 (UTC) Subject: [Goodies-commits] r5023 - xfce4-datetime-plugin/trunk Message-ID: <20080702212525.24BDAF29E0@mocha.foo-projects.org> Author: ongardie Date: 2008-07-02 21:25:25 +0000 (Wed, 02 Jul 2008) New Revision: 5023 Modified: xfce4-datetime-plugin/trunk/AUTHORS xfce4-datetime-plugin/trunk/NEWS xfce4-datetime-plugin/trunk/THANKS xfce4-datetime-plugin/trunk/configure.in.in Log: Prepare for v0.6.0 release Modified: xfce4-datetime-plugin/trunk/AUTHORS =================================================================== --- xfce4-datetime-plugin/trunk/AUTHORS 2008-07-02 21:25:20 UTC (rev 5022) +++ xfce4-datetime-plugin/trunk/AUTHORS 2008-07-02 21:25:25 UTC (rev 5023) @@ -1,2 +1,3 @@ Choe Hwanjin Remco den Breeje +Diego Ongaro Modified: xfce4-datetime-plugin/trunk/NEWS =================================================================== --- xfce4-datetime-plugin/trunk/NEWS 2008-07-02 21:25:20 UTC (rev 5022) +++ xfce4-datetime-plugin/trunk/NEWS 2008-07-02 21:25:25 UTC (rev 5023) @@ -0,0 +1,28 @@ +2008-07-02 +================================================================================ +xfce4-datetime-plugin v0.6.0 released + +This is almost entirely a bug fix release. Thanks to Steve Tyler, especially, +for reporting over 15 bugs and submitting many patches. + +One notable user interface change is that the panel button is now a +GtkToggleButton, so it will light up when you hover the mouse over it and +appear pushed in when you click on it. + +There's a tooltips implementation in the works that unfortunately isn't ready +yet for this release - see Bug #4141 for details. I think this will be the +primary goal for next time. + +-Diego Ongaro + +Historical Releases +================================================================================ +2007-02-?? xfce4-datetime-plugin v0.5.0 released +2007-??-?? xfce4-datetime-plugin v0.4.3 released +2007-??-?? xfce4-datetime-plugin v0.4.2 released +2006-12-19 xfce4-datetime-plugin v0.4.1 released +2006-10-06 xfce4-datetime-plugin v0.4.0 released +2004-09-11 xfce4-datetime-plugin v0.3.1 released +2004-01-18 xfce4-datetime-plugin v0.3.0 released +2003-10-12 xfce4-datetime-plugin v0.2.0 released +2003-09-30 xfce4-datetime-plugin v0.1.0 released Modified: xfce4-datetime-plugin/trunk/THANKS =================================================================== --- xfce4-datetime-plugin/trunk/THANKS 2008-07-02 21:25:20 UTC (rev 5022) +++ xfce4-datetime-plugin/trunk/THANKS 2008-07-02 21:25:25 UTC (rev 5023) @@ -1,40 +1,17 @@ -What's this file about? ------------------------ -This file lists all external people that have contributed to this project and -thereby helped the development of this project. +Special thanks goes to: +======================= +Nick Schermer for + - Some cleanups after the initial version for the 4.2 panel -Testers (sorted by name): --------------------------- -These people have contributed to xfce4-datetime-plugin by testing the software, -reporting problems and making useful suggestions. +Scott H + - Bug# 2867 - Nick Schermer - * Some cleanups after the initial version for the 4.2 panel +Laurent Meunier + - Bug# 3062, 3073 - Scott H - * Bug# 2867 +Mike Massonnet + - Providing a bug fix patch that became svn r4812-4814 - Laurent Meunier - * Bug# 3062, 3073 - -Translators (sorted by language): ----------------------------------- -These people have translated xfce4-datetime-plugin to foreign languages. - - Remco den Breeje - * nl (Dutch) translations - - LuckAs - * uk (Ukrainian) translations - - SZERV?C Attila - * hu (Hungarian) translations - - Piarres Beobide - * eu (Basque) translations - -Other contributors (sorted by name): ------------------------------------- - - +Steve Tyler + - Reporting over 15 bugs for the 0.6 release alone, including many patches Modified: xfce4-datetime-plugin/trunk/configure.in.in =================================================================== --- xfce4-datetime-plugin/trunk/configure.in.in 2008-07-02 21:25:20 UTC (rev 5022) +++ xfce4-datetime-plugin/trunk/configure.in.in 2008-07-02 21:25:25 UTC (rev 5023) @@ -1,6 +1,6 @@ dnl Version information m4_define([datetime_version_major], [0]) -m4_define([datetime_version_minor], [5]) +m4_define([datetime_version_minor], [6]) m4_define([datetime_version_micro], [0]) m4_define([datetime_version], [datetime_version_major().datetime_version_minor().datetime_version_micro()]) From ongardie at xfce.org Wed Jul 2 23:29:04 2008 From: ongardie at xfce.org (Diego Ongaro) Date: Wed, 2 Jul 2008 21:29:04 +0000 (UTC) Subject: [Goodies-commits] r5024 - xfce4-datetime-plugin/trunk Message-ID: <20080702212904.E7B5BF29E0@mocha.foo-projects.org> Author: ongardie Date: 2008-07-02 21:29:04 +0000 (Wed, 02 Jul 2008) New Revision: 5024 Modified: xfce4-datetime-plugin/trunk/ChangeLog Log: Update changelog with 0.6.0 release entry Modified: xfce4-datetime-plugin/trunk/ChangeLog =================================================================== --- xfce4-datetime-plugin/trunk/ChangeLog 2008-07-02 21:25:25 UTC (rev 5023) +++ xfce4-datetime-plugin/trunk/ChangeLog 2008-07-02 21:29:04 UTC (rev 5024) @@ -1,5 +1,6 @@ 2008-07-02 Diego Ongaro + * *: 0.6.0 release * panel-plugin/datetime.h: Disable tooltips for now (Bug #4141) 2008-06-27 Diego Ongaro From ongardie at xfce.org Wed Jul 2 23:30:16 2008 From: ongardie at xfce.org (Diego Ongaro) Date: Wed, 2 Jul 2008 21:30:16 +0000 (UTC) Subject: [Goodies-commits] r5025 - xfce4-datetime-plugin/tags Message-ID: <20080702213016.CF2E0F29E0@mocha.foo-projects.org> Author: ongardie Date: 2008-07-02 21:30:16 +0000 (Wed, 02 Jul 2008) New Revision: 5025 Added: xfce4-datetime-plugin/tags/datetime_0_6_0/ Log: Tag datetime 0.6 release Copied: xfce4-datetime-plugin/tags/datetime_0_6_0 (from rev 5024, xfce4-datetime-plugin/trunk) From jeromeg at xfce.org Sat Jul 5 11:23:55 2008 From: jeromeg at xfce.org (Jerome Guelfucci) Date: Sat, 5 Jul 2008 09:23:55 +0000 (UTC) Subject: [Goodies-commits] r5026 - in xfce4-screenshooter-plugin/trunk: . po src Message-ID: <20080705092355.D16C7F29E0@mocha.foo-projects.org> Author: jeromeg Date: 2008-07-05 09:23:55 +0000 (Sat, 05 Jul 2008) New Revision: 5026 Modified: xfce4-screenshooter-plugin/trunk/ChangeLog xfce4-screenshooter-plugin/trunk/po/POTFILES.in xfce4-screenshooter-plugin/trunk/src/main.c xfce4-screenshooter-plugin/trunk/src/screenshooter-utils.c xfce4-screenshooter-plugin/trunk/src/screenshooter-utils.h Log: Make filename translatable. Modified: xfce4-screenshooter-plugin/trunk/ChangeLog =================================================================== --- xfce4-screenshooter-plugin/trunk/ChangeLog 2008-07-02 21:30:16 UTC (rev 5025) +++ xfce4-screenshooter-plugin/trunk/ChangeLog 2008-07-05 09:23:55 UTC (rev 5026) @@ -1,3 +1,7 @@ +2008-07-05 jeromeg + + * src/*, po/POTFILES.in: bugfix, make filename translatable. + 2008-06-29 jeromeg * src/screenshooter-plugin.c: Modified: xfce4-screenshooter-plugin/trunk/po/POTFILES.in =================================================================== --- xfce4-screenshooter-plugin/trunk/po/POTFILES.in 2008-07-02 21:30:16 UTC (rev 5025) +++ xfce4-screenshooter-plugin/trunk/po/POTFILES.in 2008-07-05 09:23:55 UTC (rev 5026) @@ -1,3 +1,4 @@ src/screenshooter-plugin.c src/main.c +src/screenshooter-utils.c src/screenshooter.desktop.in.in Modified: xfce4-screenshooter-plugin/trunk/src/main.c =================================================================== --- xfce4-screenshooter-plugin/trunk/src/main.c 2008-07-02 21:30:16 UTC (rev 5025) +++ xfce4-screenshooter-plugin/trunk/src/main.c 2008-07-05 09:23:55 UTC (rev 5026) @@ -29,8 +29,6 @@ #include #endif -#include - #include "screenshooter-utils.h" gboolean version = FALSE; Modified: xfce4-screenshooter-plugin/trunk/src/screenshooter-utils.c =================================================================== --- xfce4-screenshooter-plugin/trunk/src/screenshooter-utils.c 2008-07-02 21:30:16 UTC (rev 5025) +++ xfce4-screenshooter-plugin/trunk/src/screenshooter-utils.c 2008-07-05 09:23:55 UTC (rev 5026) @@ -105,7 +105,7 @@ if (XQueryTree (GDK_DISPLAY (), xid, &root, &parent, &children, &nchildren) == 0) { - g_warning ("Couldn't find window manager window"); + g_warning ( _("Couldn't find window manager window") ); return None; } @@ -157,7 +157,7 @@ return NULL; } - file_name = g_strdup ("Screenshot.png"); + file_name = g_strdup ( _("Screenshot.png") ); if( g_access ( g_build_filename (uri, file_name, NULL), F_OK ) != 0 ) { @@ -168,7 +168,7 @@ { i++; g_free (file_name); - file_name = g_strdup_printf ("Screenshot-%d.png", i); + file_name = g_strdup_printf ( _("Screenshot-%d.png"), i); } while( g_access ( g_build_filename (uri, file_name, NULL), F_OK ) == 0 ); Modified: xfce4-screenshooter-plugin/trunk/src/screenshooter-utils.h =================================================================== --- xfce4-screenshooter-plugin/trunk/src/screenshooter-utils.h 2008-07-02 21:30:16 UTC (rev 5025) +++ xfce4-screenshooter-plugin/trunk/src/screenshooter-utils.h 2008-07-05 09:23:55 UTC (rev 5026) @@ -33,6 +33,8 @@ #include #include +#include + #include #include #include From squisher at xfce.org Sat Jul 5 20:02:58 2008 From: squisher at xfce.org (David Mohr) Date: Sat, 5 Jul 2008 18:02:58 +0000 (UTC) Subject: [Goodies-commits] r5027 - in xfburn/trunk: . xfburn Message-ID: <20080705180258.A1194F29E0@mocha.foo-projects.org> Author: squisher Date: 2008-07-05 18:02:58 +0000 (Sat, 05 Jul 2008) New Revision: 5027 Modified: xfburn/trunk/NEWS xfburn/trunk/TODO xfburn/trunk/xfburn/xfburn-burn-data-composition-base-dialog.c Log: Changing iso_write_opts profile to preserve file attribute Modified: xfburn/trunk/NEWS =================================================================== --- xfburn/trunk/NEWS 2008-07-05 09:23:55 UTC (rev 5026) +++ xfburn/trunk/NEWS 2008-07-05 18:02:58 UTC (rev 5027) @@ -10,6 +10,7 @@ and _please_ report this as a bug! Please include the console output if debug is enabled, or otherwise some info on the burner that was used. - Use fifo buffering, default is 4MB, adjustable in the preferences +- Preserve file attributes xfburn 0.3.0 ============ Modified: xfburn/trunk/TODO =================================================================== --- xfburn/trunk/TODO 2008-07-05 09:23:55 UTC (rev 5026) +++ xfburn/trunk/TODO 2008-07-05 18:02:58 UTC (rev 5027) @@ -43,3 +43,5 @@ - add refresh button and disable blank if invalid disc [?] - unify code to add files (currently add button and dnd have separate code bases) [?] +- determine if it's worth it to add advanced burn options dialog to + toggle rockridge and joliet extensions / iso_write_opts profiles Modified: xfburn/trunk/xfburn/xfburn-burn-data-composition-base-dialog.c =================================================================== --- xfburn/trunk/xfburn/xfburn-burn-data-composition-base-dialog.c 2008-07-05 09:23:55 UTC (rev 5026) +++ xfburn/trunk/xfburn/xfburn-burn-data-composition-base-dialog.c 2008-07-05 18:02:58 UTC (rev 5027) @@ -536,9 +536,13 @@ iso_image_set_volset_id (priv->image, comp_name); } - /* Sets profile 2 [distribution] */ - iso_write_opts_new (&write_opts, 2); + /* Sets profile 0 [basic] */ + iso_write_opts_new (&write_opts, 0); + iso_write_opts_set_iso_level (write_opts, 2); + iso_write_opts_set_rockridge (write_opts, TRUE); + iso_write_opts_set_joliet (write_opts, TRUE); + if (iso_image_create_burn_source (priv->image, write_opts, &src) < 0) { /* could not create source */ xfce_err (_("Could not create ISO source structure")); From squisher at xfce.org Sat Jul 5 20:42:52 2008 From: squisher at xfce.org (David Mohr) Date: Sat, 5 Jul 2008 18:42:52 +0000 (UTC) Subject: [Goodies-commits] r5028 - xfburn/trunk/xfburn Message-ID: <20080705184252.B4E0CF29E0@mocha.foo-projects.org> Author: squisher Date: 2008-07-05 18:42:52 +0000 (Sat, 05 Jul 2008) New Revision: 5028 Modified: xfburn/trunk/xfburn/xfburn-burn-data-composition-base-dialog.c Log: Also allow deep paths Modified: xfburn/trunk/xfburn/xfburn-burn-data-composition-base-dialog.c =================================================================== --- xfburn/trunk/xfburn/xfburn-burn-data-composition-base-dialog.c 2008-07-05 18:02:58 UTC (rev 5027) +++ xfburn/trunk/xfburn/xfburn-burn-data-composition-base-dialog.c 2008-07-05 18:42:52 UTC (rev 5028) @@ -542,6 +542,10 @@ iso_write_opts_set_iso_level (write_opts, 2); iso_write_opts_set_rockridge (write_opts, TRUE); iso_write_opts_set_joliet (write_opts, TRUE); + iso_write_opts_set_allow_deep_paths (write_opts, TRUE); + /* not sure if we want that + iso_write_opts_set_omit_version_numbers (write_opts, TRUE); + */ if (iso_image_create_burn_source (priv->image, write_opts, &src) < 0) { /* could not create source */ From squisher at xfce.org Mon Jul 7 05:31:36 2008 From: squisher at xfce.org (David Mohr) Date: Mon, 7 Jul 2008 03:31:36 +0000 (UTC) Subject: [Goodies-commits] r5029 - in xfburn/trunk: . xfburn Message-ID: <20080707033136.311DFF29E3@mocha.foo-projects.org> Author: squisher Date: 2008-07-07 03:31:35 +0000 (Mon, 07 Jul 2008) New Revision: 5029 Modified: xfburn/trunk/NEWS xfburn/trunk/TODO xfburn/trunk/xfburn/xfburn-adding-progress.c xfburn/trunk/xfburn/xfburn-adding-progress.h xfburn/trunk/xfburn/xfburn-data-composition.c Log: Using threads for adding files, adding can now get aborted Modified: xfburn/trunk/NEWS =================================================================== --- xfburn/trunk/NEWS 2008-07-05 18:42:52 UTC (rev 5028) +++ xfburn/trunk/NEWS 2008-07-07 03:31:35 UTC (rev 5029) @@ -11,6 +11,7 @@ debug is enabled, or otherwise some info on the burner that was used. - Use fifo buffering, default is 4MB, adjustable in the preferences - Preserve file attributes +- Now using threads for adding files, and the adding can get aborted xfburn 0.3.0 ============ Modified: xfburn/trunk/TODO =================================================================== --- xfburn/trunk/TODO 2008-07-05 18:42:52 UTC (rev 5028) +++ xfburn/trunk/TODO 2008-07-07 03:31:35 UTC (rev 5029) @@ -45,3 +45,5 @@ code bases) [?] - determine if it's worth it to add advanced burn options dialog to toggle rockridge and joliet extensions / iso_write_opts profiles +- check for memory leaks while adding files +- check if all the enter/leaving of gdk threads slows adding down Modified: xfburn/trunk/xfburn/xfburn-adding-progress.c =================================================================== --- xfburn/trunk/xfburn/xfburn-adding-progress.c 2008-07-05 18:42:52 UTC (rev 5028) +++ xfburn/trunk/xfburn/xfburn-adding-progress.c 2008-07-07 03:31:35 UTC (rev 5029) @@ -24,26 +24,38 @@ #include #include +#include "xfburn-global.h" #include "xfburn-adding-progress.h" +#include "xfburn-utils.h" #define XFBURN_ADDING_PROGRESS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), XFBURN_TYPE_ADDING_PROGRESS, XfburnAddingProgressPrivate)) +enum { + ADDING_DONE, + LAST_SIGNAL, +}; + /* private struct */ typedef struct { GtkWidget *progress_bar; + gboolean aborted; } XfburnAddingProgressPrivate; /* prototypes */ static void xfburn_adding_progress_class_init (XfburnAddingProgressClass *); static void xfburn_adding_progress_init (XfburnAddingProgress *); +static void xfburn_adding_progress_finalize (GObject * object); +static gboolean cb_delete (GtkWidget *widget, GdkEvent *event, gpointer data); /* globals */ static GtkWindowClass *parent_class = NULL; +static guint signals[LAST_SIGNAL]; /******************************/ /* XfburnAddingProgress class */ /******************************/ + GtkType xfburn_adding_progress_get_type (void) { @@ -72,10 +84,18 @@ static void xfburn_adding_progress_class_init (XfburnAddingProgressClass * klass) { + GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (klass, sizeof (XfburnAddingProgressPrivate)); parent_class = g_type_class_peek_parent (klass); + + object_class->finalize = xfburn_adding_progress_finalize; + + signals[ADDING_DONE] = g_signal_new ("adding-done", XFBURN_TYPE_ADDING_PROGRESS, G_SIGNAL_ACTION, + G_STRUCT_OFFSET (XfburnAddingProgressClass, adding_done), + NULL, NULL, g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); } static void @@ -84,6 +104,8 @@ XfburnAddingProgressPrivate *priv = XFBURN_ADDING_PROGRESS_GET_PRIVATE (win); GtkWidget *vbox; + gtk_window_set_resizable (GTK_WINDOW (win), FALSE); + gtk_window_set_icon_name (GTK_WINDOW (win), GTK_STOCK_ADD); gtk_window_set_destroy_with_parent (GTK_WINDOW (win), TRUE); gtk_window_set_title (GTK_WINDOW (win), _("Adding files to the composition")); @@ -93,19 +115,42 @@ gtk_container_add (GTK_CONTAINER (win), vbox); priv->progress_bar = gtk_progress_bar_new (); - gtk_progress_bar_set_pulse_step (GTK_PROGRESS_BAR (priv->progress_bar), 0.1); + gtk_progress_bar_set_pulse_step (GTK_PROGRESS_BAR (priv->progress_bar), 0.01); gtk_widget_show (priv->progress_bar); - gtk_box_pack_start (GTK_BOX (vbox), priv->progress_bar, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (vbox), priv->progress_bar, TRUE, TRUE, BORDER); gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (priv->progress_bar), 0.5); + + priv->aborted = FALSE; + g_signal_connect (G_OBJECT (win), "delete-event", G_CALLBACK (cb_delete), NULL); } +static void +xfburn_adding_progress_finalize (GObject * object) +{ + //XfburnAddingProgressPrivate *priv = XFBURN_ADDING_PROGRESS_GET_PRIVATE (object); + +} + /* internals */ +static gboolean +cb_delete (GtkWidget *widget, GdkEvent *event, gpointer data) +{ + XfburnAddingProgressPrivate *priv = XFBURN_ADDING_PROGRESS_GET_PRIVATE (widget); + priv->aborted = TRUE; + + return TRUE; +} + /******************/ /* public methods */ /******************/ -GtkWidget * + +/* + * These functions are expected to be called from the gui thread + */ +XfburnAddingProgress * xfburn_adding_progress_new (void) { GtkWidget *obj; @@ -113,14 +158,46 @@ obj = g_object_new (xfburn_adding_progress_get_type (), NULL); gtk_widget_realize (obj); - return obj; + + return XFBURN_ADDING_PROGRESS (obj); } +/* + * these functions are expected to be called from the secondary thread + */ void xfburn_adding_progress_pulse (XfburnAddingProgress *adding_progress) { XfburnAddingProgressPrivate *priv = XFBURN_ADDING_PROGRESS_GET_PRIVATE (adding_progress); - DBG ("pulse"); + gdk_threads_enter (); + //DBG ("pulse"); gtk_progress_bar_pulse (GTK_PROGRESS_BAR (priv->progress_bar)); + gdk_threads_leave (); } + +void +xfburn_adding_progress_done (XfburnAddingProgress *adding_progress) +{ + //XfburnAddingProgressPrivate *priv = XFBURN_ADDING_PROGRESS_GET_PRIVATE (adding_progress); + + gdk_threads_enter (); + g_signal_emit (G_OBJECT (adding_progress), signals[ADDING_DONE], 0); + gdk_threads_leave (); +} + +gboolean +xfburn_adding_progress_is_aborted (XfburnAddingProgress *adding_progress) +{ + XfburnAddingProgressPrivate *priv = XFBURN_ADDING_PROGRESS_GET_PRIVATE (adding_progress); + + return priv->aborted; +} + +void xfburn_adding_progress_show (XfburnAddingProgress *adding_progress) +{ + XfburnAddingProgressPrivate *priv = XFBURN_ADDING_PROGRESS_GET_PRIVATE (adding_progress); + + priv->aborted = FALSE; + gtk_widget_show (GTK_WIDGET (adding_progress)); +} Modified: xfburn/trunk/xfburn/xfburn-adding-progress.h =================================================================== --- xfburn/trunk/xfburn/xfburn-adding-progress.h 2008-07-05 18:42:52 UTC (rev 5028) +++ xfburn/trunk/xfburn/xfburn-adding-progress.h 2008-07-07 03:31:35 UTC (rev 5029) @@ -26,6 +26,8 @@ #include +#include "xfburn-data-composition.h" + G_BEGIN_DECLS #define XFBURN_TYPE_ADDING_PROGRESS (xfburn_adding_progress_get_type ()) #define XFBURN_ADDING_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFBURN_TYPE_ADDING_PROGRESS, XfburnAddingProgress)) @@ -33,23 +35,26 @@ #define XFBURN_IS_ADDING_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFBURN_TYPE_ADDING_PROGRESS)) #define XFBURN_IS_ADDING_PROGRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFBURN_TYPE_ADDING_PROGRESS)) #define XFBURN_ADDING_PROGRESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFBURN_TYPE_ADDING_PROGRESS, XfburnAddingProgressClass)) -typedef struct _XfburnAddingProgress XfburnAddingProgress; -typedef struct _XfburnAddingProgressClass XfburnAddingProgressClass; -struct _XfburnAddingProgress +typedef struct { GtkWindow window; -}; +} XfburnAddingProgress; -struct _XfburnAddingProgressClass +typedef struct { GtkWindowClass parent_class; -}; + void (*adding_done) (XfburnAddingProgress *progress, XfburnDataComposition *dc); +} XfburnAddingProgressClass; GtkType xfburn_adding_progress_get_type (void); -GtkWidget *xfburn_adding_progress_new (void); +XfburnAddingProgress *xfburn_adding_progress_new (void); void xfburn_adding_progress_pulse (XfburnAddingProgress *adding_progress); +void xfburn_adding_progress_wait_until_done (XfburnAddingProgress *adding_progress); +void xfburn_adding_progress_done (XfburnAddingProgress *adding_progress); +gboolean xfburn_adding_progress_is_aborted (XfburnAddingProgress *adding_progress); +void xfburn_adding_progress_show (XfburnAddingProgress *adding_progress); G_END_DECLS #endif Modified: xfburn/trunk/xfburn/xfburn-data-composition.c =================================================================== --- xfburn/trunk/xfburn/xfburn-data-composition.c 2008-07-05 18:42:52 UTC (rev 5028) +++ xfburn/trunk/xfburn/xfburn-data-composition.c 2008-07-07 03:31:35 UTC (rev 5029) @@ -48,10 +48,7 @@ #include "xfburn-data-composition.h" #include "xfburn-global.h" -#if 0 #include "xfburn-adding-progress.h" -#endif - #include "xfburn-composition.h" #include "xfburn-burn-data-cd-composition-dialog.h" #include "xfburn-burn-data-dvd-composition-dialog.h" @@ -61,6 +58,46 @@ #define XFBURN_DATA_COMPOSITION_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), XFBURN_TYPE_DATA_COMPOSITION, XfburnDataCompositionPrivate)) +enum +{ + DATA_COMPOSITION_COLUMN_ICON, + DATA_COMPOSITION_COLUMN_CONTENT, + DATA_COMPOSITION_COLUMN_HUMANSIZE, + DATA_COMPOSITION_COLUMN_SIZE, + DATA_COMPOSITION_COLUMN_PATH, + DATA_COMPOSITION_COLUMN_TYPE, + DATA_COMPOSITION_N_COLUMNS +}; + +typedef enum +{ + DATA_COMPOSITION_TYPE_FILE, + DATA_COMPOSITION_TYPE_DIRECTORY +} DataCompositionEntryType; + + +/* thread parameters */ +typedef struct { + char **filenames; + int filec; + XfburnDataComposition *dc; +} ThreadAddFilesCLIParams; + +typedef struct { + XfburnDataComposition *dc; + GtkTreeModel *model; + GtkTreeIter iter_where_insert; + DataCompositionEntryType type; +} ThreadAddFilesActionParams; + +typedef struct { + XfburnDataComposition *composition; + DataCompositionEntryType type; + GtkWidget *widget; + GtkTreeViewDropPosition position; + GtkTreeIter iter_dummy; +} ThreadAddFilesDragParams; + /* prototypes */ static void xfburn_data_composition_class_init (XfburnDataCompositionClass *); static void composition_interface_init (XfburnCompositionInterface *composition, gpointer iface_data); @@ -90,37 +127,36 @@ XfburnDataComposition *); static void cb_content_drag_data_get (GtkWidget * widget, GdkDragContext * dc, GtkSelectionData * data, guint info, guint time, XfburnDataComposition * content); +static void cb_adding_done (XfburnAddingProgress *progress, XfburnDataComposition *dc); -static gboolean add_file_to_list_with_name (const gchar *name, XfburnDataComposition * dc, GtkTreeModel * model, - const gchar * path, GtkTreeIter * iter, GtkTreeIter * insertion, - GtkTreeViewDropPosition position); -static gboolean add_file_to_list (XfburnDataComposition * dc, GtkTreeModel * model, const gchar * path, GtkTreeIter * iter, - GtkTreeIter * insertion, GtkTreeViewDropPosition position); +/* thread entry points */ +static void thread_add_files_cli (ThreadAddFilesCLIParams *params); +static void thread_add_files_action (ThreadAddFilesActionParams *params); +static void thread_add_files_drag (ThreadAddFilesDragParams *params); + +/* thread helpers */ +static gboolean thread_add_file_to_list_with_name (const gchar *name, XfburnDataComposition * dc, + GtkTreeModel * model, const gchar * path, GtkTreeIter * iter, + GtkTreeIter * insertion, GtkTreeViewDropPosition position); +static gboolean thread_add_file_to_list (XfburnDataComposition * dc, GtkTreeModel * model, const gchar * path, + GtkTreeIter * iter, GtkTreeIter * insertion, GtkTreeViewDropPosition position); static IsoImage * generate_iso_image (XfburnDataComposition * dc); -enum -{ - DATA_COMPOSITION_COLUMN_ICON, - DATA_COMPOSITION_COLUMN_CONTENT, - DATA_COMPOSITION_COLUMN_HUMANSIZE, - DATA_COMPOSITION_COLUMN_SIZE, - DATA_COMPOSITION_COLUMN_PATH, - DATA_COMPOSITION_COLUMN_TYPE, - DATA_COMPOSITION_N_COLUMNS -}; - -typedef enum -{ - DATA_COMPOSITION_TYPE_FILE, - DATA_COMPOSITION_TYPE_DIRECTORY -} DataCompositionEntryType; - typedef struct { gchar *filename; gboolean modified; guint n_new_directory; + + GSList *full_paths_to_add; + gchar *selected_files; + GtkTreePath *path_where_insert; + + GdkDragContext * dc; + gboolean success; + gboolean del; + guint32 time; GtkActionGroup *action_group; GtkUIManager *ui_manager; @@ -129,9 +165,8 @@ GtkWidget *entry_volume_name; GtkWidget *content; GtkWidget *disc_usage; -#if 0 GtkWidget *progress; -#endif + } XfburnDataCompositionPrivate; /* globals */ @@ -246,6 +281,8 @@ {"text/plain", 0, DATA_COMPOSITION_DND_TARGET_TEXT_PLAIN} }; + priv->full_paths_to_add = NULL; + instances++; /* initialize static members */ @@ -365,11 +402,12 @@ G_CALLBACK (cb_treeview_button_pressed), composition); g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK (cb_selection_changed), composition); -#if 0 /* adding progress window */ - priv->progress = xfburn_adding_progress_new (); -#endif - + priv->progress = GTK_WIDGET (xfburn_adding_progress_new ()); + g_signal_connect (G_OBJECT (priv->progress), "adding-done", G_CALLBACK (cb_adding_done), composition); + gtk_window_set_transient_for (GTK_WINDOW (priv->progress), GTK_WINDOW (xfburn_main_window_get_instance ())); + /* FIXME: progress should have a busy cursor */ + /* disc usage */ priv->disc_usage = xfburn_data_disc_usage_new (); gtk_box_pack_start (GTK_BOX (composition), priv->disc_usage, FALSE, FALSE, 5); @@ -600,6 +638,7 @@ if (strcmp (current_filename, filename) == 0) { g_free (current_filename); gtk_tree_path_free (current_path); + gdk_threads_leave (); return TRUE; } @@ -641,6 +680,32 @@ } static void +cb_adding_done (XfburnAddingProgress *progress, XfburnDataComposition *dc) +{ + XfburnDataCompositionPrivate *priv = XFBURN_DATA_COMPOSITION_GET_PRIVATE (dc); + + gtk_widget_hide (priv->progress); + + if (priv->selected_files) { + g_free (priv->selected_files); + priv->selected_files = NULL; + } + + if (priv->path_where_insert) { + gtk_tree_path_free (priv->path_where_insert); + priv->path_where_insert = NULL; + } + + if (priv->full_paths_to_add) { + g_slist_foreach (priv->full_paths_to_add, (GFunc) g_free, NULL); + g_slist_free (priv->full_paths_to_add); + priv->full_paths_to_add = NULL; + } + + xfburn_default_cursor (priv->content); +} + +static void action_rename_selection (GtkAction * action, XfburnDataComposition * dc) { XfburnDataCompositionPrivate *priv = XFBURN_DATA_COMPOSITION_GET_PRIVATE (dc); @@ -818,6 +883,7 @@ g_list_free (references); } + static void action_add_selected_files (GtkAction *action, XfburnDataComposition *dc) { @@ -830,107 +896,35 @@ selected_files = xfburn_file_browser_get_selection (browser); if (selected_files) { - GtkTreeModel *model; - const gchar * file = NULL; GtkTreeSelection *selection; GList *selected_paths = NULL; - GtkTreePath *path_where_insert = NULL; - GtkTreeIter iter_where_insert; - DataCompositionEntryType type = -1; + ThreadAddFilesActionParams *params; + + xfburn_adding_progress_show (XFBURN_ADDING_PROGRESS (priv->progress)); + + params = g_new (ThreadAddFilesActionParams, 1); + params->dc = dc; + params->type = -1; + priv->path_where_insert = NULL; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->content)); selected_paths = gtk_tree_selection_get_selected_rows (selection, NULL); - model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->content)); + params->model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->content)); if (selected_paths) { - path_where_insert = (GtkTreePath *) (selected_paths->data); + priv->path_where_insert = (GtkTreePath *) (selected_paths->data); - gtk_tree_model_get_iter (model, &iter_where_insert, path_where_insert); - gtk_tree_model_get (model, &iter_where_insert, DATA_COMPOSITION_COLUMN_TYPE, &type, -1); + gtk_tree_model_get_iter (params->model, ¶ms->iter_where_insert, priv->path_where_insert); + gtk_tree_model_get (params->model, ¶ms->iter_where_insert, DATA_COMPOSITION_COLUMN_TYPE, ¶ms->type, -1); } - file = strtok (selected_files, "\n"); - while (file) { - GtkTreeIter iter; - gchar *full_path = NULL; - - if (g_str_has_prefix (file, "file://")) - full_path = g_build_filename (&file[7], NULL); - else if (g_str_has_prefix (file, "file:")) - full_path = g_build_filename (&file[5], NULL); - else - full_path = g_build_filename (file, NULL); + priv->selected_files = selected_files; - if (full_path[strlen (full_path) - 1] == '\r') - full_path[strlen (full_path) - 1] = '\0'; - - if (strcmp (full_path, g_getenv ("HOME")) == 0) { - GtkMessageDialog *dialog = (GtkMessageDialog *) gtk_message_dialog_new (NULL, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_WARNING, - GTK_BUTTONS_YES_NO, - ((const gchar *) _("Adding home directory"))); - gint ret; - gboolean quit = FALSE; - DBG ("Adding home directory"); - gtk_message_dialog_format_secondary_text (dialog, - _("You are about to add your home directory to the composition. This is likely to take a very long time, and also to be too big to fit on one disc.\n\nAre you sure you want to proceed?")); - ret = gtk_dialog_run (GTK_DIALOG (dialog)); - switch (ret) { - case GTK_RESPONSE_YES: - break; - default: - g_free (full_path); - quit = TRUE; - } - xfburn_busy_cursor (GTK_DIALOG (dialog)->vbox); - gtk_widget_destroy (GTK_WIDGET (dialog)); - if (quit) - break; - } - - /* add files to the disc content */ - if (type == DATA_COMPOSITION_TYPE_DIRECTORY) { - guint64 old_size, size; - gchar *humansize = NULL; - - add_file_to_list (dc, model, full_path, &iter, &iter_where_insert, GTK_TREE_VIEW_DROP_INTO_OR_AFTER); - gtk_tree_view_expand_row (GTK_TREE_VIEW (priv->content), path_where_insert, FALSE); - - /* update parent directory size */ - gtk_tree_model_get (model, &iter_where_insert, DATA_COMPOSITION_COLUMN_SIZE, &old_size, -1); - gtk_tree_model_get (model, &iter, DATA_COMPOSITION_COLUMN_SIZE, &size, -1); - - humansize = xfburn_humanreadable_filesize (old_size + size); - - gtk_tree_store_set (GTK_TREE_STORE (model), &iter_where_insert, - DATA_COMPOSITION_COLUMN_HUMANSIZE, humansize, - DATA_COMPOSITION_COLUMN_SIZE, old_size + size, -1); - - g_free (humansize); - } else if (type == DATA_COMPOSITION_TYPE_FILE) { - GtkTreeIter parent; - - if (gtk_tree_model_iter_parent (model, &parent, &iter_where_insert)) - add_file_to_list (dc, model, full_path, &iter, &parent, GTK_TREE_VIEW_DROP_INTO_OR_AFTER); - else - add_file_to_list (dc, model, full_path, &iter, NULL, GTK_TREE_VIEW_DROP_AFTER); - } else { - add_file_to_list (dc, model, full_path, &iter, NULL, GTK_TREE_VIEW_DROP_AFTER); - } - - g_free (full_path); - - file = strtok (NULL, "\n"); - } + g_thread_create ((GThreadFunc) thread_add_files_action, params, FALSE, NULL); g_list_foreach (selected_paths, (GFunc) gtk_tree_path_free, NULL); g_list_free (selected_paths); - - g_free (selected_files); } - - xfburn_default_cursor (priv->content); } static void @@ -1004,8 +998,9 @@ } static gboolean -add_file_to_list_with_name (const gchar *name, XfburnDataComposition * dc, GtkTreeModel * model, const gchar * path, - GtkTreeIter * iter, GtkTreeIter * insertion, GtkTreeViewDropPosition position) +thread_add_file_to_list_with_name (const gchar *name, XfburnDataComposition * dc, + GtkTreeModel * model, const gchar * path, + GtkTreeIter * iter, GtkTreeIter * insertion, GtkTreeViewDropPosition position) { XfburnDataCompositionPrivate *priv = XFBURN_DATA_COMPOSITION_GET_PRIVATE (dc); @@ -1031,9 +1026,7 @@ } g_free (basename); -#if 0 xfburn_adding_progress_pulse (XFBURN_ADDING_PROGRESS (priv->progress)); -#endif /* find parent */ switch (position){ @@ -1042,10 +1035,12 @@ if (insertion) { GtkTreeIter iter_parent; + gdk_threads_enter (); if (gtk_tree_model_iter_parent (model, &iter_parent, insertion)) { parent = g_new0 (GtkTreeIter, 1); memcpy (parent, &iter_parent, sizeof (GtkTreeIter)); } + gdk_threads_leave (); } break; case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE: @@ -1056,13 +1051,16 @@ } /* check if the filename is valid */ + gdk_threads_enter (); if (parent) { tree_path = gtk_tree_model_get_path (model, parent); gtk_tree_path_down (tree_path); } else { tree_path = gtk_tree_path_new_first (); } + gdk_threads_leave (); + gdk_threads_enter (); if (file_exists_on_same_level (model, tree_path, FALSE, name)) { xfce_err (_("A file with the same name is already present in the composition")); @@ -1071,6 +1069,7 @@ return FALSE; } gtk_tree_path_free (tree_path); + gdk_threads_leave (); /* new directory */ if (S_ISDIR (s.st_mode)) { @@ -1089,6 +1088,7 @@ return FALSE; } + gdk_threads_enter (); gtk_tree_store_append (GTK_TREE_STORE (model), iter, parent); gtk_tree_store_set (GTK_TREE_STORE (model), iter, @@ -1097,6 +1097,7 @@ DATA_COMPOSITION_COLUMN_TYPE, DATA_COMPOSITION_TYPE_DIRECTORY, DATA_COMPOSITION_COLUMN_SIZE, (guint64) 4, -1); xfburn_data_disc_usage_add_size (XFBURN_DATA_DISC_USAGE (priv->disc_usage), (guint64) 4); + gdk_threads_leave (); while ((filename = g_dir_read_name (dir))) { GtkTreeIter new_iter; @@ -1106,8 +1107,10 @@ if (new_path) { guint64 size; - if (add_file_to_list (dc, model, new_path, &new_iter, iter, GTK_TREE_VIEW_DROP_INTO_OR_AFTER)) { + if (thread_add_file_to_list (dc, model, new_path, &new_iter, iter, GTK_TREE_VIEW_DROP_INTO_OR_AFTER)) { + gdk_threads_enter (); gtk_tree_model_get (model, &new_iter, DATA_COMPOSITION_COLUMN_SIZE, &size, -1); + gdk_threads_leave (); total_size += size; } @@ -1116,31 +1119,34 @@ } humansize = xfburn_humanreadable_filesize (total_size); + gdk_threads_enter (); gtk_tree_store_set (GTK_TREE_STORE (model), iter, DATA_COMPOSITION_COLUMN_HUMANSIZE, humansize, DATA_COMPOSITION_COLUMN_SIZE, total_size, -1); + gdk_threads_leave (); g_dir_close (dir); } /* new file */ else if (S_ISREG (s.st_mode)) { #ifdef HAVE_THUNAR_VFS - GdkScreen *screen; - GtkIconTheme *icon_theme; - ThunarVfsMimeDatabase *mime_database = NULL; - ThunarVfsMimeInfo *mime_info = NULL; - const gchar *mime_icon_name = NULL; - GdkPixbuf *mime_icon = NULL; - gint x,y; + GdkScreen *screen; + GtkIconTheme *icon_theme; + ThunarVfsMimeDatabase *mime_database = NULL; + ThunarVfsMimeInfo *mime_info = NULL; + const gchar *mime_icon_name = NULL; + GdkPixbuf *mime_icon = NULL; + gint x,y; - screen = gtk_widget_get_screen (GTK_WIDGET (dc)); - icon_theme = gtk_icon_theme_get_for_screen (screen); - - mime_database = thunar_vfs_mime_database_get_default (); - mime_info = thunar_vfs_mime_database_get_info_for_file (mime_database, path, NULL); - - gtk_icon_size_lookup (GTK_ICON_SIZE_SMALL_TOOLBAR, &x, &y); - mime_icon_name = thunar_vfs_mime_info_lookup_icon_name (mime_info, icon_theme); - mime_icon = gtk_icon_theme_load_icon (icon_theme, mime_icon_name, x, 0, NULL); + gdk_threads_enter (); + screen = gtk_widget_get_screen (GTK_WIDGET (dc)); + icon_theme = gtk_icon_theme_get_for_screen (screen); + + mime_database = thunar_vfs_mime_database_get_default (); + mime_info = thunar_vfs_mime_database_get_info_for_file (mime_database, path, NULL); + + gtk_icon_size_lookup (GTK_ICON_SIZE_SMALL_TOOLBAR, &x, &y); + mime_icon_name = thunar_vfs_mime_info_lookup_icon_name (mime_info, icon_theme); + mime_icon = gtk_icon_theme_load_icon (icon_theme, mime_icon_name, x, 0, NULL); #endif gtk_tree_store_append (GTK_TREE_STORE (model), iter, parent); @@ -1165,10 +1171,11 @@ xfburn_data_disc_usage_add_size (XFBURN_DATA_DISC_USAGE (priv->disc_usage), s.st_size); #ifdef HAVE_THUNAR_VFS - if (G_LIKELY (G_IS_OBJECT (mime_icon))) - g_object_unref (mime_icon); - thunar_vfs_mime_info_unref (mime_info); - g_object_unref (mime_database); + if (G_LIKELY (G_IS_OBJECT (mime_icon))) + g_object_unref (mime_icon); + thunar_vfs_mime_info_unref (mime_info); + g_object_unref (mime_database); + gdk_threads_leave (); #endif } g_free (humansize); @@ -1181,19 +1188,162 @@ return FALSE; } +/* thread entry point */ +static void +thread_add_files_cli (ThreadAddFilesCLIParams *params) +{ + XfburnDataCompositionPrivate *priv = XFBURN_DATA_COMPOSITION_GET_PRIVATE (params->dc); + GtkTreeIter iter; + + GtkTreeModel *model; + int i; + gchar *full_path = NULL; + + gdk_threads_enter (); + model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->content)); + gdk_threads_leave (); + + for (i=0; ifilec; i++) { + full_path = g_build_filename (params->filenames[i], NULL); + g_message ("Adding %s to the data composition... (might take a while)", full_path); + thread_add_file_to_list (params->dc, model, full_path, &iter, NULL, GTK_TREE_VIEW_DROP_AFTER); + g_free (full_path); + } + xfburn_adding_progress_done (XFBURN_ADDING_PROGRESS (priv->progress)); +} + static gboolean -add_file_to_list (XfburnDataComposition * dc, GtkTreeModel * model, const gchar * path, GtkTreeIter * iter, - GtkTreeIter * insertion, GtkTreeViewDropPosition position) +show_add_home_question_dialog () { + GtkMessageDialog *dialog; + gint ret; + gboolean ok = TRUE; + + gdk_threads_enter (); + DBG ("Adding home directory"); + dialog = (GtkMessageDialog *) gtk_message_dialog_new (NULL, + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_YES_NO, + ((const gchar *) _("Adding home directory"))); + gtk_message_dialog_format_secondary_text (dialog, + _("You are about to add your home directory to the composition. This is likely to take a very long time, and also to be too big to fit on one disc.\n\nAre you sure you want to proceed?")); + ret = gtk_dialog_run (GTK_DIALOG (dialog)); + switch (ret) { + case GTK_RESPONSE_YES: + break; + default: + ok = FALSE; + } + xfburn_busy_cursor (GTK_DIALOG (dialog)->vbox); + gtk_widget_destroy (GTK_WIDGET (dialog)); + + gdk_threads_leave (); + + return ok; +} + +/* thread entry point */ +static void +thread_add_files_action (ThreadAddFilesActionParams *params) +{ + XfburnDataComposition *dc = params->dc; + XfburnDataCompositionPrivate *priv = XFBURN_DATA_COMPOSITION_GET_PRIVATE (dc); + GtkTreeModel *model = params->model; + GtkTreeIter iter_where_insert = params->iter_where_insert; + GtkTreePath *path_where_insert = priv->path_where_insert; + const gchar * file = NULL; + + + file = strtok (priv->selected_files, "\n"); + while (file) { + GtkTreeIter iter; + gchar *full_path = NULL; + + if (g_str_has_prefix (file, "file://")) + full_path = g_build_filename (&file[7], NULL); + else if (g_str_has_prefix (file, "file:")) + full_path = g_build_filename (&file[5], NULL); + else + full_path = g_build_filename (file, NULL); + + if (full_path[strlen (full_path) - 1] == '\r') + full_path[strlen (full_path) - 1] = '\0'; + + if (strcmp (full_path, g_getenv ("HOME")) == 0) { + if (!show_add_home_question_dialog ()) { + g_free (full_path); + break; + } + } + + /* add files to the disc content */ + if (params->type == DATA_COMPOSITION_TYPE_DIRECTORY) { + guint64 old_size, size; + gchar *humansize = NULL; + + thread_add_file_to_list (dc, model, full_path, &iter, &iter_where_insert, GTK_TREE_VIEW_DROP_INTO_OR_AFTER); + gdk_threads_enter (); + gtk_tree_view_expand_row (GTK_TREE_VIEW (priv->content), path_where_insert, FALSE); + + /* update parent directory size */ + gtk_tree_model_get (model, &iter_where_insert, DATA_COMPOSITION_COLUMN_SIZE, &old_size, -1); + gtk_tree_model_get (model, &iter, DATA_COMPOSITION_COLUMN_SIZE, &size, -1); + gdk_threads_leave (); + + humansize = xfburn_humanreadable_filesize (old_size + size); + + gdk_threads_enter (); + gtk_tree_store_set (GTK_TREE_STORE (model), &iter_where_insert, + DATA_COMPOSITION_COLUMN_HUMANSIZE, humansize, + DATA_COMPOSITION_COLUMN_SIZE, old_size + size, -1); + gdk_threads_leave (); + + g_free (humansize); + } else if (params->type == DATA_COMPOSITION_TYPE_FILE) { + GtkTreeIter parent; + gboolean has_parent; + + gdk_threads_enter (); + has_parent = gtk_tree_model_iter_parent (model, &parent, &iter_where_insert); + gdk_threads_leave (); + + if (has_parent) + thread_add_file_to_list (dc, model, full_path, &iter, &parent, GTK_TREE_VIEW_DROP_INTO_OR_AFTER); + else + thread_add_file_to_list (dc, model, full_path, &iter, NULL, GTK_TREE_VIEW_DROP_AFTER); + } else { + thread_add_file_to_list (dc, model, full_path, &iter, NULL, GTK_TREE_VIEW_DROP_AFTER); + } + + g_free (full_path); + + file = strtok (NULL, "\n"); + } + xfburn_adding_progress_done (XFBURN_ADDING_PROGRESS (priv->progress)); +} + +static gboolean +thread_add_file_to_list (XfburnDataComposition * dc, GtkTreeModel * model, + const gchar * path, GtkTreeIter * iter, GtkTreeIter * insertion, GtkTreeViewDropPosition position) +{ + XfburnDataCompositionPrivate *priv = XFBURN_DATA_COMPOSITION_GET_PRIVATE (dc); struct stat s; gboolean ret = FALSE; + if (xfburn_adding_progress_is_aborted (XFBURN_ADDING_PROGRESS (priv->progress))) { + DBG ("Adding aborted"); + xfburn_adding_progress_done (XFBURN_ADDING_PROGRESS (priv->progress)); + /* FIXME: does this properly release the resources allocated in this thread? */ + g_thread_exit (NULL); + } + if ((stat (path, &s) == 0)) { gchar *basename = NULL; - + basename = g_path_get_basename (path); - ret = add_file_to_list_with_name (basename, dc, model, path, iter, insertion, position); + ret = thread_add_file_to_list_with_name (basename, dc, model, path, iter, insertion, position); g_free (basename); } @@ -1318,6 +1468,8 @@ GtkTreeIter *iter = NULL; DataCompositionEntryType type_dest = -1; + xfburn_adding_progress_show (XFBURN_ADDING_PROGRESS (priv->progress)); + row = selected_rows = *((GList **) sd->data); if (path_where_insert) { @@ -1363,10 +1515,6 @@ continue; } - gtk_tree_model_get_iter (model, &iter_src, path_src); - gtk_tree_model_get (model, &iter_src, DATA_COMPOSITION_COLUMN_TYPE, &type, - DATA_COMPOSITION_COLUMN_SIZE, &size, -1); - if (path_where_insert && type == DATA_COMPOSITION_TYPE_DIRECTORY && gtk_tree_path_is_descendant (path_where_insert, path_src)) { @@ -1377,6 +1525,10 @@ gtk_drag_finish (dc, FALSE, FALSE, t); return; } + + gtk_tree_model_get_iter (model, &iter_src, path_src); + gtk_tree_model_get (model, &iter_src, DATA_COMPOSITION_COLUMN_TYPE, &type, + DATA_COMPOSITION_COLUMN_SIZE, &size, -1); /* copy entry */ if (copy_entry_to (composition, &iter_src, iter, position)) { @@ -1435,17 +1587,17 @@ if (path_where_insert) gtk_tree_path_free (path_where_insert); + gtk_widget_hide (priv->progress); + xfburn_default_cursor (priv->content); } else if (sd->target == gdk_atom_intern ("text/plain", FALSE)) { + ThreadAddFilesDragParams *params; const gchar *file = NULL; -#if 0 - gtk_widget_show (priv->progress); -#endif + xfburn_adding_progress_show (XFBURN_ADDING_PROGRESS (priv->progress)); file = strtok ((gchar *) sd->data, "\n"); while (file) { - GtkTreeIter iter; gchar *full_path; if (g_str_has_prefix (file, "file://")) @@ -1458,37 +1610,77 @@ if (full_path[strlen (full_path) - 1] == '\r') full_path[strlen (full_path) - 1] = '\0'; - /* add files to the disc content */ - if (path_where_insert) { - gtk_tree_model_get_iter (model, &iter_where_insert, path_where_insert); - - if (add_file_to_list (composition, model, full_path, &iter, &iter_where_insert, position)) { - if (position == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE - || position == GTK_TREE_VIEW_DROP_INTO_OR_AFTER) - gtk_tree_view_expand_row (GTK_TREE_VIEW (widget), path_where_insert, FALSE); - } - - gtk_tree_path_free (path_where_insert); - } else { - add_file_to_list (composition, model, full_path, &iter, NULL, position); - } - - g_free (full_path); + /* remember path to add it later in another thread */ + priv->full_paths_to_add = g_slist_append (priv->full_paths_to_add, full_path); file = strtok (NULL, "\n"); } -#if 0 - gtk_widget_hide (priv->progress); -#endif + priv->full_paths_to_add = g_slist_reverse (priv->full_paths_to_add); + + params = g_new (ThreadAddFilesDragParams, 1); + params->composition = composition; + params->position = position; + params->widget = widget; + + /* append a dummy row so that gtk doesn't freak out */ + gtk_tree_store_append (GTK_TREE_STORE (model), ¶ms->iter_dummy, NULL); + + g_thread_create ((GThreadFunc) thread_add_files_drag, params, FALSE, NULL); + gtk_drag_finish (dc, TRUE, FALSE, t); } else { gtk_drag_finish (dc, FALSE, FALSE, t); + xfburn_default_cursor (priv->content); } - xfburn_default_cursor (priv->content); } +/* thread entry point */ static void +thread_add_files_drag (ThreadAddFilesDragParams *params) +{ + XfburnDataComposition *composition = params->composition; + XfburnDataCompositionPrivate *priv = XFBURN_DATA_COMPOSITION_GET_PRIVATE (composition); + + GtkTreeViewDropPosition position = params->position; + GtkWidget *widget = params->widget; + + GtkTreeModel *model; + GtkTreeIter iter_where_insert; + GSList *files = priv->full_paths_to_add; + + gdk_threads_enter (); + model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget)); + + /* remove the dummy row again */ + gtk_tree_store_remove (GTK_TREE_STORE (model), ¶ms->iter_dummy); + gdk_threads_leave (); + + for (; files; files = g_slist_next (files)) { + gchar *full_path = (gchar *) files->data; + GtkTreeIter iter; + + if (priv->path_where_insert) { + gdk_threads_enter (); + gtk_tree_model_get_iter (model, &iter_where_insert, priv->path_where_insert); + gdk_threads_leave (); + + if (thread_add_file_to_list (composition, model, full_path, &iter, &iter_where_insert, position)) { + if (position == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE + || position == GTK_TREE_VIEW_DROP_INTO_OR_AFTER) + gdk_threads_enter (); + gtk_tree_view_expand_row (GTK_TREE_VIEW (widget), priv->path_where_insert, FALSE); + gdk_threads_leave (); + } + + } else { + thread_add_file_to_list (composition, model, full_path, &iter, NULL, position); + } + } + xfburn_adding_progress_done (XFBURN_ADDING_PROGRESS (priv->progress)); +} + +static void fill_image_with_composition (GtkTreeModel *model, IsoImage *image, IsoDir * parent, GtkTreeIter *iter) { do { @@ -1589,6 +1781,7 @@ { LoadParserStruct * parserinfo = (LoadParserStruct *) data; XfburnDataCompositionPrivate *priv = XFBURN_DATA_COMPOSITION_GET_PRIVATE (parserinfo->dc); + if (!(parserinfo->started) && !strcmp (element_name, "xfburn-composition")) parserinfo->started = TRUE; @@ -1600,15 +1793,18 @@ if ((i = _find_attribute (attribute_names, "name")) != -1 && (j = _find_attribute (attribute_names, "source")) != -1) { - GtkTreeIter iter; + //GtkTreeIter iter; GtkTreeIter *parent; GtkTreeModel *model; model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->content)); parent = g_queue_peek_head (parserinfo->queue_iter); + g_error ("This method needs to get fixed, and does not work right now!"); + /* add_file_to_list_with_name (attribute_values[i], parserinfo->dc, model, attribute_values[j], &iter, parent, GTK_TREE_VIEW_DROP_INTO_OR_AFTER); + */ } } else if (!strcmp (element_name, "directory")) { int i, j; @@ -1817,28 +2013,20 @@ void xfburn_data_composition_add_files (XfburnDataComposition *dc, int filec, char **filenames) { + XfburnDataCompositionPrivate *priv = XFBURN_DATA_COMPOSITION_GET_PRIVATE (dc); + ThreadAddFilesCLIParams *params; + if (filec > 0) { - XfburnDataCompositionPrivate *priv = XFBURN_DATA_COMPOSITION_GET_PRIVATE (dc); + params = g_new (ThreadAddFilesCLIParams, 1); - GtkTreeModel *model; - int i; - gchar *full_path = NULL; + params->filenames = filenames; + params->filec = filec; + params->dc = dc; - model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->content)); - + xfburn_adding_progress_show (XFBURN_ADDING_PROGRESS (priv->progress)); xfburn_busy_cursor (priv->content); - for (i=0; icontent); + g_thread_create ((GThreadFunc) thread_add_files_cli, params, FALSE, NULL); } } From majkl at xfce.org Mon Jul 7 19:34:27 2008 From: majkl at xfce.org (Michal Varady) Date: Mon, 7 Jul 2008 17:34:27 +0000 (UTC) Subject: [Goodies-commits] r5030 - xfce4-screenshooter-plugin/trunk/po xfce4-sensors-plugin/trunk/po Message-ID: <20080707173427.9DF7AF29E3@mocha.foo-projects.org> Author: majkl Date: 2008-07-07 17:34:27 +0000 (Mon, 07 Jul 2008) New Revision: 5030 Modified: xfce4-screenshooter-plugin/trunk/po/cs.po xfce4-sensors-plugin/trunk/po/cs.po Log: Updated Czech translations Modified: xfce4-screenshooter-plugin/trunk/po/cs.po =================================================================== --- xfce4-screenshooter-plugin/trunk/po/cs.po 2008-07-07 03:31:35 UTC (rev 5029) +++ xfce4-screenshooter-plugin/trunk/po/cs.po 2008-07-07 17:34:27 UTC (rev 5030) @@ -3,13 +3,12 @@ # This file is distributed under the same license as the xfce4-screenshooter-plugin package. # Michal V?rady , 2006. # -#: ../src/main.c:70 msgid "" msgstr "" "Project-Id-Version: xfce4-screenshooter-plugin 1.0.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-06-20 09:01+0200\n" -"PO-Revision-Date: 2006-09-24 13:02+0100\n" +"PO-Revision-Date: 2008-07-07 19:29+0100\n" "Last-Translator: Michal V?rady \n" "Language-Team: Czech \n" "MIME-Version: 1.0\n" @@ -19,69 +18,65 @@ #. Create the dialog #: ../src/screenshooter-plugin.c:271 -#, fuzzy msgid "Screenshooter plugin" -msgstr "Zpo?d?n? po??zen? sn?mku" +msgstr "Z?suvn? modul pro po?izov?n? sn?mk? obrazovky" #. Create the frame for screenshot modes and fill it with the radio buttons #: ../src/screenshooter-plugin.c:296 msgid "Modes" -msgstr "" +msgstr "Re?imy" #: ../src/screenshooter-plugin.c:305 -#, fuzzy msgid "Take a screenshot of desktop" -msgstr "Po??dit sn?mek obrazovky" +msgstr "Po??dit sn?mek obrazovky pracovn?ho prost?ed?" -#: ../src/screenshooter-plugin.c:314 ../src/main.c:47 -#, fuzzy +#: ../src/screenshooter-plugin.c:314 +#: ../src/main.c:47 msgid "Take a screenshot of the active window" -msgstr "Po??dit sn?mek obrazovky" +msgstr "Po??dit sn?mek aktivn?ho okna" #. Create the options frame and add the delay and save options #: ../src/screenshooter-plugin.c:323 msgid "Options" -msgstr "" +msgstr "Volby" #. Save option #: ../src/screenshooter-plugin.c:333 msgid "Show save dialog" -msgstr "" +msgstr "Zobrazit dialogov? okno ulo?it" #: ../src/screenshooter-plugin.c:344 -msgid "" -"Default save location" -msgstr "" +msgid "Default save location" +msgstr "V?choz? um?st?n? pro ukl?d?n?" #: ../src/screenshooter-plugin.c:349 msgid "Default save location" -msgstr "" +msgstr "V?choz? um?st?n? pro ukl?d?n?" #: ../src/screenshooter-plugin.c:358 -msgid "" -"Delay before taking the " -"screenshot" -msgstr "" +msgid "Delay before taking the screenshot" +msgstr "Zpo?d?n? p?ed po??zen?m sn?mku obrazovky" #: ../src/screenshooter-plugin.c:372 msgid "seconds" -msgstr "" +msgstr "sekund" #: ../src/screenshooter-plugin.c:398 msgid "Take screenshot" msgstr "Po??dit sn?mek obrazovky" -#: ../src/screenshooter-plugin.c:405 ../src/main.c:96 +#: ../src/screenshooter-plugin.c:405 +#: ../src/main.c:96 msgid "Save screenshot as ..." msgstr "Ulo?it sn?mek obrazovky jako..." #: ../src/main.c:43 msgid "Version information" -msgstr "" +msgstr "Informace o verzi" #: ../src/main.c:51 msgid "Delay in seconds before taking the screenshot" -msgstr "" +msgstr "Zpo?d?n? p?ed po??zen?m sn?mku obrazovky v sekund?ch" #: ../src/main.c:74 #, c-format @@ -89,6 +84,8 @@ "%s: %s\n" "Try %s --help to see a full list of available command line options.\n" msgstr "" +"%s: %s\n" +"Kompletn? v?pis dostupn?ch voleb z?sk?te p?ep?na?em %s --help\n" #: ../src/screenshooter.desktop.in.in.h:1 msgid " Screenshot" @@ -96,26 +93,21 @@ #: ../src/screenshooter.desktop.in.in.h:2 msgid " Take a screenshot" -msgstr "Po??dit sn?mek obrazovky" +msgstr " Po??dit sn?mek obrazovky" #, fuzzy #~ msgid "Delay before taking the screenshot" #~ msgstr "Po??dit sn?mek obrazovky" - #~ msgid "Properties" #~ msgstr "Vlastnosti" - #~ msgid "Screenshots" #~ msgstr "Sn?mky obrazovky" - #~ msgid "Ask for _filename" #~ msgstr "Pt?t se na _n?zev souboru" - #~ msgid "Error grabbing the pointer %d" #~ msgstr "Chyba p?i uchopen? ukazatele %d" - #~ msgid "Always take shot of the whole screen" #~ msgstr "V?dy zachytit celou obrazovku" - #~ msgid "Window selection delay" #~ msgstr "Zpo?d?n? pro v?b?r okna" + Modified: xfce4-sensors-plugin/trunk/po/cs.po =================================================================== --- xfce4-sensors-plugin/trunk/po/cs.po 2008-07-07 03:31:35 UTC (rev 5029) +++ xfce4-sensors-plugin/trunk/po/cs.po 2008-07-07 17:34:27 UTC (rev 5030) @@ -8,7 +8,7 @@ "Project-Id-Version: xfce4-sensors-plugin 0.9.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-06-26 23:45+0200\n" -"PO-Revision-Date: 2007-12-17 22:25+0100\n" +"PO-Revision-Date: 2008-07-07 19:33+0100\n" "Last-Translator: Michal V?rady \n" "Language-Team: Czech \n" "MIME-Version: 1.0\n" @@ -16,7 +16,8 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: ../panel-plugin/sensors.c:204 ../panel-plugin/sensors.c:788 +#: ../panel-plugin/sensors.c:204 +#: ../panel-plugin/sensors.c:788 msgid "Sensors" msgstr "Senzory" @@ -29,7 +30,8 @@ #. if (scale == FAHRENHEIT) { #. cf->formatted_value = g_strdup_printf(_("%5.1f ?F"), (float) (value * 9/5 + 32) ); #. } else { // Celsius -#: ../panel-plugin/sensors.c:562 ../panel-plugin/hddtemp.c:444 +#: ../panel-plugin/sensors.c:562 +#: ../panel-plugin/hddtemp.c:444 #, c-format msgid "%5.1f ?C" msgstr "%5.1f ?C" @@ -63,7 +65,8 @@ #. FIXME: either print nothing, or undertake appropriate action, #. * or pop up a message box. -#: ../panel-plugin/sensors.c:651 ../panel-plugin/sensors.c:1162 +#: ../panel-plugin/sensors.c:651 +#: ../panel-plugin/sensors.c:1162 #, c-format msgid "" "Xfce Hardware Sensors Plugin:\n" @@ -108,7 +111,7 @@ #: ../panel-plugin/sensors.c:1783 msgid "Description:" -msgstr "" +msgstr "Popis:" #: ../panel-plugin/sensors.c:1820 msgid "Name" @@ -172,17 +175,16 @@ msgstr "Stupn? _Fahrenheita" #: ../panel-plugin/sensors.c:1972 -#, fuzzy msgid "Show _Units" -msgstr "_Zobrazovat titulek" +msgstr "Zo_brazovat jednotky" #: ../panel-plugin/sensors.c:1993 msgid "Small horizontal s_pacing" -msgstr "" +msgstr "Mal? vodorovn? odd?lovac? prostor" #: ../panel-plugin/sensors.c:2015 msgid "Suppress messages" -msgstr "" +msgstr "Potla?it zpr?vy" #: ../panel-plugin/sensors.c:2044 msgid "U_pdate interval (seconds):" @@ -208,7 +210,8 @@ msgid "Edit Properties" msgstr "Upravit vlastnosti" -#: ../panel-plugin/sensors.c:2232 ../panel-plugin/sensors.h:41 +#: ../panel-plugin/sensors.c:2232 +#: ../panel-plugin/sensors.h:41 msgid "Sensors Plugin" msgstr "Z?suvn? modul senzory" @@ -216,13 +219,17 @@ #. or do only use this , if it is an lmsensors device. whatever. #. FIXME: compare strings, or also have hddtmep and acpi store numeric values #. assert correctly saved file -#: ../panel-plugin/configuration.c:140 ../panel-plugin/configuration.c:317 -#: ../panel-plugin/configuration.c:324 ../panel-plugin/hddtemp.c:229 -#: ../panel-plugin/hddtemp.c:270 ../panel-plugin/hddtemp.c:275 +#: ../panel-plugin/configuration.c:140 +#: ../panel-plugin/configuration.c:317 +#: ../panel-plugin/configuration.c:324 +#: ../panel-plugin/hddtemp.c:229 +#: ../panel-plugin/hddtemp.c:270 +#: ../panel-plugin/hddtemp.c:275 msgid "Hard disks" msgstr "Pevn? disky" -#: ../panel-plugin/acpi.c:412 ../panel-plugin/acpi.c:420 +#: ../panel-plugin/acpi.c:412 +#: ../panel-plugin/acpi.c:420 msgid "ACPI" msgstr "ACPI" @@ -238,42 +245,36 @@ msgstr "" #: ../panel-plugin/hddtemp.c:94 -#, fuzzy msgid "Xfce 4 Sensors Plugin" -msgstr "Z?suvn? modul senzory" +msgstr "Z?suvn? modul Senzory pro Xfce 4" #: ../panel-plugin/hddtemp.c:274 msgid "S.M.A.R.T. harddisk temperatures" -msgstr "Teploty pevn?ch disk? S.M.A.R.T." +msgstr "Teploty pevn?ch disk? ze syst?mu S.M.A.R.T." #: ../panel-plugin/hddtemp.c:354 -#, fuzzy, c-format +#, c-format msgid "" -"\"hddtemp\" was not executed correctly, although it is executable. This is " -"most probably due to the disks requiring root privileges to read their " -"temperatures, and \"hddtemp\" not being setuid root.\n" +"\"hddtemp\" was not executed correctly, although it is executable. This is most probably due to the disks requiring root privileges to read their temperatures, and \"hddtemp\" not being setuid root.\n" "\n" -"An easy but dirty solution is to run \"chmod u+s %s\" as root user and " -"restart this plugin or its panel.\n" +"An easy but dirty solution is to run \"chmod u+s %s\" as root user and restart this plugin or its panel.\n" "\n" "Calling \"%s\" gave the following error:\n" "%s\n" "with a return value of %d.\n" msgstr "" -"Aplikace \"hddtemp\" nebyla korektn? spu?t?na, p?esto?e je spustiteln?. " -"Disky obvykle ke ?ten? teploty vy?aduj? opr?vn?n? u?ivatele root, ale " -"aplikace \"hddtemp\" nem? nastaven bit suid.\n" +"Aplikace \"hddtemp\" nebyla korektn? spu?t?na, p?esto?e je spustiteln?. Disky obvykle ke ?ten? teploty vy?aduj? opr?vn?n? u?ivatele root, ale aplikace \"hddtemp\" nem? nastaven bit suid.\n" "\n" -"Jednoduch?m, ale ne?ist?m ?e?en?m je spu?t?n? p??kazu \"chmod u+s %s\" opd " -"u?ivatelem root a n?sledn? op?tovn? spu?t?n? tohoto z?suvn?ho modulu nebo " -"jeho panelu.\n" +"Jednoduch?m, ale ne?ist?m ?e?en?m je spu?t?n? p??kazu \"chmod u+s %s\" pod u?ivatelem root a n?sledn? op?tovn? spu?t?n? tohoto z?suvn?ho modulu nebo jeho panelu.\n" "\n" "Vol?n? \"%s\" vr?tilo tuto chybu:\n" -"%s" +"%s\n" +"with a return value of %d.\n" -#: ../panel-plugin/hddtemp.c:364 ../panel-plugin/hddtemp.c:390 +#: ../panel-plugin/hddtemp.c:364 +#: ../panel-plugin/hddtemp.c:390 msgid "Suppress this message in future" -msgstr "" +msgstr "Potla?it budouc? zpr?vy" #: ../panel-plugin/hddtemp.c:388 #, c-format @@ -288,7 +289,8 @@ msgid "LM Sensors" msgstr "Senzory LM:" -#: ../panel-plugin/lmsensors.c:335 ../panel-plugin/lmsensors.c:382 +#: ../panel-plugin/lmsensors.c:335 +#: ../panel-plugin/lmsensors.c:382 #, c-format msgid "Error: Could not connect to sensors!" msgstr "Chyba: Nelze se p?ipojit k senzor?m!" @@ -311,15 +313,12 @@ #~ "Z?suvn? modul Senzory hardwaru pro Xfce: \n" #~ "Do?lo k pot???m p?i ?ten? hodnoty senzoru. \n" #~ "Spr?vn? funk?nost nem??e b?t zaru?ena.\n" - #~ msgid "Sensors\n" #~ msgstr "Senzory\n" - #~ msgid "Sensors" #~ msgstr "Senzory" - #~ msgid "Sensors" #~ msgstr "Senzory" - #~ msgid "View" #~ msgstr "Zobrazit" + From squisher at xfce.org Mon Jul 7 22:20:57 2008 From: squisher at xfce.org (David Mohr) Date: Mon, 7 Jul 2008 20:20:57 +0000 (UTC) Subject: [Goodies-commits] r5031 - xfburn/trunk/xfburn Message-ID: <20080707202057.104AAF29E3@mocha.foo-projects.org> Author: squisher Date: 2008-07-07 20:20:56 +0000 (Mon, 07 Jul 2008) New Revision: 5031 Modified: xfburn/trunk/xfburn/xfburn-data-composition.c xfburn/trunk/xfburn/xfburn-main.c Log: Adding cli option to open the blank dialog Modified: xfburn/trunk/xfburn/xfburn-data-composition.c =================================================================== --- xfburn/trunk/xfburn/xfburn-data-composition.c 2008-07-07 17:34:27 UTC (rev 5030) +++ xfburn/trunk/xfburn/xfburn-data-composition.c 2008-07-07 20:20:56 UTC (rev 5031) @@ -1463,6 +1463,7 @@ xfburn_busy_cursor (priv->content); + /* move a selection inside of the composition window */ if (sd->target == gdk_atom_intern ("XFBURN_TREE_PATHS", FALSE)) { GList *row = NULL, *selected_rows = NULL; GtkTreeIter *iter = NULL; @@ -1590,6 +1591,7 @@ gtk_widget_hide (priv->progress); xfburn_default_cursor (priv->content); } + /* drag from the file selector */ else if (sd->target == gdk_atom_intern ("text/plain", FALSE)) { ThreadAddFilesDragParams *params; const gchar *file = NULL; @@ -1630,6 +1632,7 @@ gtk_drag_finish (dc, TRUE, FALSE, t); } else { + g_warning ("Trying to receive an unsupported drag target, this should not happen."); gtk_drag_finish (dc, FALSE, FALSE, t); xfburn_default_cursor (priv->content); } Modified: xfburn/trunk/xfburn/xfburn-main.c =================================================================== --- xfburn/trunk/xfburn/xfburn-main.c 2008-07-07 17:34:27 UTC (rev 5030) +++ xfburn/trunk/xfburn/xfburn-main.c 2008-07-07 20:20:56 UTC (rev 5031) @@ -43,6 +43,7 @@ #include "xfburn-stock.h" #include "xfburn-burn-image-dialog.h" #include "xfburn-main-window.h" +#include "xfburn-blank-dialog.h" /* internal prototypes */ @@ -55,16 +56,19 @@ static gboolean other_action = FALSE; static gboolean show_main = FALSE; static gboolean add_data_composition = FALSE; +static gboolean blank = FALSE; static GOptionEntry optionentries[] = { { "burn-image", 'i', G_OPTION_FLAG_OPTIONAL_ARG /* || G_OPTION_FLAG_FILENAME */, G_OPTION_ARG_CALLBACK, &parse_option, "Open the burn image dialog. The filename of the image can optionally be specified as a parameter", NULL }, + { "blank", 'b', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, &parse_option, + "Open the blank disc dialog.", NULL }, { "data-composition", 'd', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, &parse_option, "Start a data composition. Optionally followed by files/directories to be added to the composition.", NULL }, { "version", 'V', G_OPTION_FLAG_NO_ARG , G_OPTION_ARG_NONE, &show_version, "Display program version and exit", NULL }, { "main", 'm', G_OPTION_FLAG_NO_ARG , G_OPTION_ARG_NONE, &show_main, - "Show main program even when other action is specified on the command line", NULL }, + "Show main program even when other action is specified on the command line.", NULL }, { NULL }, }; @@ -78,6 +82,8 @@ image_filename = g_strdup(value); } else if (strcmp (option_name, "-d") == 0 || strcmp (option_name, "--data-composition") == 0) { add_data_composition = TRUE; + } else if (strcmp (option_name, "-b") == 0 || strcmp (option_name, "--blank") == 0) { + blank = TRUE; } else { g_set_error (error, 0, G_OPTION_ERROR_FAILED, "Invalid command line option. Please report, this is a bug."); return FALSE; @@ -146,6 +152,7 @@ gtk_widget_destroy (GTK_WIDGET (dialog)); } + /* evaluate parsed command line options */ if (image_filename != NULL) { @@ -170,8 +177,15 @@ gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); + } else if (blank) { + GtkWidget *dialog = xfburn_blank_dialog_new (); + + other_action = TRUE; + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); } + /* main window */ if (!other_action || show_main) { mainwin = xfburn_main_window_new (); From squisher at xfce.org Tue Jul 8 07:23:59 2008 From: squisher at xfce.org (David Mohr) Date: Tue, 8 Jul 2008 05:23:59 +0000 (UTC) Subject: [Goodies-commits] r5032 - xfburn/trunk/xfburn Message-ID: <20080708052359.D55BAF29E3@mocha.foo-projects.org> Author: squisher Date: 2008-07-08 05:23:59 +0000 (Tue, 08 Jul 2008) New Revision: 5032 Modified: xfburn/trunk/xfburn/xfburn-device-box.c Log: Making maximum speed the default Modified: xfburn/trunk/xfburn/xfburn-device-box.c =================================================================== --- xfburn/trunk/xfburn/xfburn-device-box.c 2008-07-07 20:20:56 UTC (rev 5031) +++ xfburn/trunk/xfburn/xfburn-device-box.c 2008-07-08 05:23:59 UTC (rev 5032) @@ -526,10 +526,11 @@ el = g_slist_next (el); } - gtk_combo_box_set_active (GTK_COMBO_BOX (priv->combo_speed), gtk_tree_model_iter_n_children (model, NULL) - 1); gtk_list_store_append (GTK_LIST_STORE (model), &iter_max); + gtk_list_store_set (GTK_LIST_STORE (model), &iter_max, SPEED_TEXT_COLUMN, _("Max"), SPEED_VALUE_COLUMN, 0, -1); + gtk_combo_box_set_active (GTK_COMBO_BOX (priv->combo_speed), gtk_tree_model_iter_n_children (model, NULL) - 1); } static void From squisher at xfce.org Tue Jul 8 18:42:12 2008 From: squisher at xfce.org (David Mohr) Date: Tue, 8 Jul 2008 16:42:12 +0000 (UTC) Subject: [Goodies-commits] r5033 - xfburn/trunk/xfburn Message-ID: <20080708164212.CFC09F29E3@mocha.foo-projects.org> Author: squisher Date: 2008-07-08 16:42:12 +0000 (Tue, 08 Jul 2008) New Revision: 5033 Modified: xfburn/trunk/xfburn/xfburn-data-composition.c Log: Small bugfix: correctly enter / exit gdk threads Modified: xfburn/trunk/xfburn/xfburn-data-composition.c =================================================================== --- xfburn/trunk/xfburn/xfburn-data-composition.c 2008-07-08 05:23:59 UTC (rev 5032) +++ xfburn/trunk/xfburn/xfburn-data-composition.c 2008-07-08 16:42:12 UTC (rev 5033) @@ -619,34 +619,34 @@ GtkTreePath *current_path = NULL; GtkTreeIter current_iter; + gdk_threads_enter (); current_path = gtk_tree_path_copy (path); for (;gtk_tree_path_prev (current_path);); - if (!gtk_tree_model_get_iter (model, ¤t_iter, current_path)) { - return FALSE; - } - - do { - gchar *current_filename = NULL; - - if (skip_path && gtk_tree_path_compare (path, current_path) == 0) { - gtk_tree_path_next (current_path); - continue; - } + if (gtk_tree_model_get_iter (model, ¤t_iter, current_path)) { + do { + gchar *current_filename = NULL; + + if (skip_path && gtk_tree_path_compare (path, current_path) == 0) { + gtk_tree_path_next (current_path); + continue; + } - gtk_tree_model_get (model, ¤t_iter, DATA_COMPOSITION_COLUMN_CONTENT, ¤t_filename, -1); - if (strcmp (current_filename, filename) == 0) { + gtk_tree_model_get (model, ¤t_iter, DATA_COMPOSITION_COLUMN_CONTENT, ¤t_filename, -1); + if (strcmp (current_filename, filename) == 0) { + g_free (current_filename); + gtk_tree_path_free (current_path); + gdk_threads_leave (); + return TRUE; + } + g_free (current_filename); - gtk_tree_path_free (current_path); - gdk_threads_leave (); - return TRUE; - } - - g_free (current_filename); - gtk_tree_path_next (current_path); - } while (gtk_tree_model_iter_next (model, ¤t_iter)); + gtk_tree_path_next (current_path); + } while (gtk_tree_model_iter_next (model, ¤t_iter)); + } gtk_tree_path_free (current_path); + gdk_threads_leave (); return FALSE; } From peter at xfce.org Tue Jul 8 22:24:24 2008 From: peter at xfce.org (Peter de Ridder) Date: Tue, 8 Jul 2008 20:24:24 +0000 (UTC) Subject: [Goodies-commits] r5034 - thunar-svn-plugin/trunk/tsp-svn-helper Message-ID: <20080708202424.EB484F29E3@mocha.foo-projects.org> Author: peter Date: 2008-07-08 20:24:24 +0000 (Tue, 08 Jul 2008) New Revision: 5034 Modified: thunar-svn-plugin/trunk/tsp-svn-helper/main.c Log: fix bug #4169 gdk_threads_enter directly behind gdk_threads_init Modified: thunar-svn-plugin/trunk/tsp-svn-helper/main.c =================================================================== --- thunar-svn-plugin/trunk/tsp-svn-helper/main.c 2008-07-08 16:42:12 UTC (rev 5033) +++ thunar-svn-plugin/trunk/tsp-svn-helper/main.c 2008-07-08 20:24:24 UTC (rev 5034) @@ -95,6 +95,9 @@ gchar **files = NULL; GError *error = NULL; + GOptionGroup *option_group; + GOptionContext *option_context; + GOptionEntry general_options_table[] = { { "version", 'v', 0, G_OPTION_ARG_NONE, &print_version, N_("Print version information"), NULL }, @@ -222,9 +225,13 @@ { NULL, '\0', 0, 0, NULL, NULL, NULL } }; - GOptionGroup *option_group; - GOptionContext *option_context = g_option_context_new(" [options] [args]"); + if (!g_thread_supported ()) + g_thread_init (NULL); + gdk_threads_init (); + gdk_threads_enter (); + option_context = g_option_context_new(" [options] [args]"); + g_option_context_add_main_entries(option_context, general_options_table, GETTEXT_PACKAGE); g_option_context_add_group(option_context, gtk_get_option_group(TRUE)); @@ -308,9 +315,6 @@ g_option_group_add_entries(option_group, update_options_table); g_option_context_add_group(option_context, option_group); - g_thread_init (NULL); - gdk_threads_init (); - if(!g_option_context_parse(option_context, &argc, &argv, &error)) { g_fprintf(stderr, "%s: %s\n\tTry --help-all\n", g_get_prgname(), error->message); @@ -465,6 +469,8 @@ svn_pool_destroy(pool); + gdk_threads_leave (); + return EXIT_SUCCESS; } From squisher at xfce.org Wed Jul 9 02:52:31 2008 From: squisher at xfce.org (David Mohr) Date: Wed, 9 Jul 2008 00:52:31 +0000 (UTC) Subject: [Goodies-commits] r5035 - xfburn/trunk/xfburn Message-ID: <20080709005231.AE0ADF29E3@mocha.foo-projects.org> Author: squisher Date: 2008-07-09 00:52:31 +0000 (Wed, 09 Jul 2008) New Revision: 5035 Modified: xfburn/trunk/xfburn/xfburn-data-composition.c Log: Bugfix for bugfix of rev. 5033 Modified: xfburn/trunk/xfburn/xfburn-data-composition.c =================================================================== --- xfburn/trunk/xfburn/xfburn-data-composition.c 2008-07-08 20:24:24 UTC (rev 5034) +++ xfburn/trunk/xfburn/xfburn-data-composition.c 2008-07-09 00:52:31 UTC (rev 5035) @@ -619,7 +619,6 @@ GtkTreePath *current_path = NULL; GtkTreeIter current_iter; - gdk_threads_enter (); current_path = gtk_tree_path_copy (path); for (;gtk_tree_path_prev (current_path);); @@ -636,7 +635,6 @@ if (strcmp (current_filename, filename) == 0) { g_free (current_filename); gtk_tree_path_free (current_path); - gdk_threads_leave (); return TRUE; } @@ -646,7 +644,6 @@ } gtk_tree_path_free (current_path); - gdk_threads_leave (); return FALSE; } @@ -1065,6 +1062,7 @@ xfce_err (_("A file with the same name is already present in the composition")); gtk_tree_path_free (tree_path); + gdk_threads_leave (); g_free (parent); return FALSE; } From mmassonnet at xfce.org Wed Jul 9 12:40:08 2008 From: mmassonnet at xfce.org (Mike Massonnet) Date: Wed, 9 Jul 2008 10:40:08 +0000 (UTC) Subject: [Goodies-commits] r5036 - in xfce4-clipman-plugin/branches/mmassonnet: . panel-plugin Message-ID: <20080709104008.63464F29E3@mocha.foo-projects.org> Author: mmassonnet Date: 2008-07-09 10:40:08 +0000 (Wed, 09 Jul 2008) New Revision: 5036 Added: xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman-settings.c xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman-settings.h Modified: xfce4-clipman-plugin/branches/mmassonnet/configure.in.in xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman.c xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman.h Log: Code cleanup Modified: xfce4-clipman-plugin/branches/mmassonnet/configure.in.in =================================================================== --- xfce4-clipman-plugin/branches/mmassonnet/configure.in.in 2008-07-09 00:52:31 UTC (rev 5035) +++ xfce4-clipman-plugin/branches/mmassonnet/configure.in.in 2008-07-09 10:40:08 UTC (rev 5036) @@ -65,6 +65,18 @@ XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.4.0]) XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.4.0]) +dnl ********************************* +dnl *** Check for configure flags *** +dnl ********************************* +AC_ARG_ENABLE([list-store], + [AC_HELP_STRING([--with-list-store], + [Build Clipman Plugin with a GtkListStore instead of GLists])], + [liststore=$enableval], + [liststore=no]) +if test "x$liststore" = "xyes"; then + AC_DEFINE([WITH_LIST_STORE], [1], [Define if build with a GtkListStore]) +fi + dnl *********************************** dnl *** Check for debugging support *** dnl *********************************** Added: xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman-settings.c =================================================================== Added: xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman-settings.h =================================================================== Modified: xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman.c =================================================================== --- xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman.c 2008-07-09 00:52:31 UTC (rev 5035) +++ xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman.c 2008-07-09 10:40:08 UTC (rev 5036) @@ -1,7 +1,7 @@ /* $Id$ * * Copyright (c) 2006-2007 Nick Schermer - * Copyright (c) 2007 Mike Massonnet + * Copyright (c) 2007-2008 Mike Massonnet * * 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 @@ -32,59 +32,49 @@ +/* Panel Plugin functions */ static void clipman_plugin_register (XfcePanelPlugin *panel_plugin); - -static ClipmanPlugin * clipman_plugin_new (XfcePanelPlugin *panel_plugin); - static void clipman_plugin_load_data (ClipmanPlugin *clipman_plugin); - static void clipman_plugin_save_data (ClipmanPlugin *clipman_plugin); - static void clipman_plugin_free (ClipmanPlugin *clipman_plugin); +static gboolean clipman_plugin_set_size (ClipmanPlugin *clipman_plugin, + gint size); +static gboolean clipman_plugin_message_received (ClipmanPlugin *clipman_plugin, + GdkEventClient *ev); +static gboolean clipman_plugin_set_selection (ClipmanPlugin *clipman_plugin); -static gboolean clipman_plugin_set_size (ClipmanPlugin *clipman_plugin, - gint size); +/* Clipman Plugin functions */ +static ClipmanPlugin * clipman_plugin_new (XfcePanelPlugin *panel_plugin); static gchar * clipman_plugin_get_short_text (ClipmanPlugin *clipman_plugin, - const gchar *text); + const gchar *text); static void clipman_plugin_menu_new (ClipmanPlugin *clipman_plugin); - -static void clipman_plugin_menu_insert_clip (ClipmanClip *clip, +static void clipman_plugin_menu_insert_clip (ClipmanClip *clip, ClipmanPlugin *clipman_plugin); static void clipman_plugin_menu_popup (ClipmanPlugin *clipman_plugin); - -static void clipman_plugin_menu_position (GtkMenu *menu, - gint *x, - gint *y, - gboolean *push_in, - gpointer user_data); +static void clipman_plugin_menu_position (GtkMenu *menu, + gint *x, + gint *y, + gboolean *push_in, + gpointer user_data); static void clipman_plugin_menu_destroy (ClipmanPlugin *clipman_plugin); - -static void clipman_plugin_menu_item_activate (GtkWidget *widget, +static void clipman_plugin_menu_item_activate (GtkWidget *widget, ClipmanPlugin *clipman_plugin); -static gboolean clipman_plugin_menu_item_pressed (GtkWidget *widget, +static gboolean clipman_plugin_menu_item_pressed (GtkWidget *widget, GdkEventButton *event, ClipmanPlugin *clipman_plugin); static void clipman_plugin_add_static (ClipmanPlugin *clipman_plugin); - static void clipman_plugin_add_static_with_text (ClipmanPlugin *clipman_plugin, - const gchar *text); -static void clipman_plugin_delete (ClipmanPlugin *clipman_plugin, - ClipmanClip *clip); -static gboolean clipman_plugin_message_received (ClipmanPlugin *clipman_plugin, - GdkEventClient *ev); -static gboolean clipman_plugin_set_selection (ClipmanPlugin *clipman_plugin); + const gchar *text); +static void clipman_plugin_delete_clip (ClipmanPlugin *clipman_plugin, + ClipmanClip *clip); +static void clipman_plugin_clear_history (ClipmanPlugin *clipman_plugin); - - - +/* Clipman Clips functions */ static ClipmanClips * clipman_clips_new (ClipmanPlugin *clipman_plugin); - +static gboolean clipman_clips_check_clipboard (ClipmanClips *clipman_clips); static void clipman_clips_clear_history (ClipmanClips *clipman_clips); - static void clipman_clips_restore_empty (ClipmanClips *clipman_clips, ClipboardType type); -static gboolean clipman_clips_check_clipboard (ClipmanClips *clipman_clips); - static void clipman_clips_add (ClipmanClips *clipman_clips, gchar *text, ClipboardType type); @@ -92,18 +82,15 @@ ClipmanClip *two); static gint clipman_clips_compare_with_type (ClipmanClip *one, ClipmanClip *two); +static ClipmanClip * clipman_clips_new_clip (gchar *text, ClipboardType type); +static void clipman_clips_free_clip (ClipmanClip *clip); -static ClipmanClip * clipman_clip_new (gchar *text, ClipboardType type); -static void clipman_clip_free (ClipmanClip *clip); - - - - XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (clipman_plugin_register); +/* Panel Plugin functions */ static void clipman_plugin_register (XfcePanelPlugin *panel_plugin) { @@ -136,29 +123,6 @@ gtk_widget_show_all (clipman_plugin->button); } -static ClipmanPlugin * -clipman_plugin_new (XfcePanelPlugin *panel_plugin) -{ - ClipmanPlugin *clipman_plugin = g_slice_new0 (ClipmanPlugin); - clipman_plugin->panel_plugin = panel_plugin; - clipman_plugin->clipman_clips = clipman_clips_new (clipman_plugin); - - clipman_plugin->button = xfce_create_panel_toggle_button (); - clipman_plugin->icon = gtk_image_new (); - - gtk_container_add (GTK_CONTAINER (clipman_plugin->button), clipman_plugin->icon); - gtk_container_add (GTK_CONTAINER (panel_plugin), clipman_plugin->button); - - g_signal_connect_swapped (clipman_plugin->button, - "toggled", - G_CALLBACK (clipman_plugin_menu_popup), - clipman_plugin); - - clipman_plugin_load_data (clipman_plugin); - - return clipman_plugin; -} - static void clipman_plugin_load_data (ClipmanPlugin *clipman_plugin) { @@ -312,13 +276,12 @@ static void clipman_plugin_free (ClipmanPlugin *clipman_plugin) { - /* There are no resources to free that won't be after we quit the plugin */ gtk_main_quit (); } static gboolean clipman_plugin_set_size (ClipmanPlugin *clipman_plugin, - gint size) + gint size) { gtk_widget_set_size_request (GTK_WIDGET (clipman_plugin->panel_plugin), size, size); size -= 2 + 2 * MAX (clipman_plugin->button->style->xthickness, @@ -342,9 +305,87 @@ return TRUE; } +static gboolean +clipman_plugin_message_received (ClipmanPlugin *clipman_plugin, + GdkEventClient *ev) +{ + DBG ("Message received"); + if (G_LIKELY (ev->data_format == 8 && *(ev->data.b) != '\0')) + { + if (!g_ascii_strcasecmp (XFCE_CLIPMAN_MESSAGE, ev->data.b)) + { + DBG ("`%s'", ev->data.b); + xfce_panel_plugin_set_panel_hidden (clipman_plugin->panel_plugin, FALSE); + while (gtk_events_pending ()) + gtk_main_iteration (); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (clipman_plugin->button), TRUE); + return TRUE; + } + } + return FALSE; +} + +static gboolean +clipman_plugin_set_selection (ClipmanPlugin *clipman_plugin) +{ + GdkScreen *gscreen; + gchar *selection_name; + Atom selection_atom; + GtkWidget *win; + Window id; + + win = gtk_invisible_new (); + gtk_widget_realize (win); + id = GDK_WINDOW_XID (GTK_WIDGET (win)->window); + + gscreen = gtk_widget_get_screen (win); + selection_name = g_strdup_printf (XFCE_CLIPMAN_SELECTION"%d", + gdk_screen_get_number (gscreen)); + selection_atom = XInternAtom (GDK_DISPLAY (), selection_name, FALSE); + + if (XGetSelectionOwner (GDK_DISPLAY (), selection_atom)) + { + gtk_widget_destroy (win); + return FALSE; + } + + XSelectInput (GDK_DISPLAY (), id, PropertyChangeMask); + XSetSelectionOwner (GDK_DISPLAY (), selection_atom, id, GDK_CURRENT_TIME); + + g_signal_connect_swapped (win, "client-event", + G_CALLBACK (clipman_plugin_message_received), + clipman_plugin); + + return TRUE; +} + +/* Clipman Plugin functions */ +static ClipmanPlugin * +clipman_plugin_new (XfcePanelPlugin *panel_plugin) +{ + ClipmanPlugin *clipman_plugin = g_slice_new0 (ClipmanPlugin); + clipman_plugin->panel_plugin = panel_plugin; + clipman_plugin->clipman_clips = clipman_clips_new (clipman_plugin); + + clipman_plugin->button = xfce_create_panel_toggle_button (); + clipman_plugin->icon = gtk_image_new (); + + gtk_container_add (GTK_CONTAINER (clipman_plugin->button), clipman_plugin->icon); + gtk_container_add (GTK_CONTAINER (panel_plugin), clipman_plugin->button); + + g_signal_connect_swapped (clipman_plugin->button, + "toggled", + G_CALLBACK (clipman_plugin_menu_popup), + clipman_plugin); + + clipman_plugin_load_data (clipman_plugin); + + return clipman_plugin; +} + static gchar * clipman_plugin_get_short_text (ClipmanPlugin *clipman_plugin, - const gchar *text) + const gchar *text) { gchar *short_text, *tmp = NULL; const gchar *offset; @@ -355,6 +396,11 @@ short_text = g_strstrip (g_strdup (text)); + /* Cleanup */ + tmp = g_strdelimit (short_text, "\n\r\t", ' '); + short_text = g_markup_escape_text (tmp, -1); + g_free (tmp); + /* Shorten */ max_length = clipman_plugin->menu_item_max_chars; if (g_utf8_strlen (short_text, -1) > max_length) @@ -367,11 +413,6 @@ g_free (tmp); } - /* Cleanup */ - tmp = g_strdelimit (short_text, "\n\r\t", ' '); - short_text = g_markup_escape_text (tmp, -1); - g_free (tmp); - return short_text; } @@ -444,8 +485,8 @@ gtk_menu_shell_append (GTK_MENU_SHELL (clipman_plugin->menu), mi); g_signal_connect_swapped (mi, "activate", - G_CALLBACK (clipman_clips_clear_history), - clipman_plugin->clipman_clips); + G_CALLBACK (clipman_plugin_clear_history), + clipman_plugin); /* Do the rest */ g_signal_connect_swapped (clipman_plugin->menu, @@ -463,7 +504,7 @@ } static void -clipman_plugin_menu_insert_clip (ClipmanClip *clip, +clipman_plugin_menu_insert_clip (ClipmanClip *clip, ClipmanPlugin *clipman_plugin) { static gint i = 0, j = 0; @@ -478,14 +519,14 @@ /* Get current clipboards */ if (clip->type != STATIC && G_UNLIKELY (NULL == clip_default)) { - /* The allocation of text is used as-is in clipman_clip_new() */ + /* The allocation of text is used as-is in clipman_clips_new_clip() */ text = gtk_clipboard_wait_for_text (clipman_plugin->clipman_clips->default_clipboard); - clip_default = clipman_clip_new (text, DEFAULT); + clip_default = clipman_clips_new_clip (text, DEFAULT); if (G_UNLIKELY (NULL == clip_default->text)) clip_default->text = g_strdup (""); text = gtk_clipboard_wait_for_text (clipman_plugin->clipman_clips->primary_clipboard); - clip_primary = clipman_clip_new (text, PRIMARY); + clip_primary = clipman_clips_new_clip (text, PRIMARY); if (G_UNLIKELY (NULL == clip_primary->text)) clip_primary->text = g_strdup (""); } @@ -605,7 +646,7 @@ break; } - /* Check if the clip matches the last clip */ + /* Check if the clip matches the last clip to reset stuff and static vars */ if (clip == clip_last) { if (clip->type != STATIC && clipman_plugin->clipman_clips->behavior == STRICTLY) @@ -634,9 +675,9 @@ /* Free memory */ if (NULL != clip_default) - clipman_clip_free (clip_default); + clipman_clips_free_clip (clip_default); if (NULL != clip_primary) - clipman_clip_free (clip_primary); + clipman_clips_free_clip (clip_primary); /* Unset static variables */ clip_default = clip_primary = clip_last = NULL; @@ -663,11 +704,11 @@ } static void -clipman_plugin_menu_position (GtkMenu *menu, - gint *x, - gint *y, +clipman_plugin_menu_position (GtkMenu *menu, + gint *x, + gint *y, gboolean *push_in, - gpointer user_data) + gpointer user_data) { XfcePanelPlugin *panel_plugin = user_data; GtkWidget *button; @@ -724,7 +765,7 @@ } static void -clipman_plugin_menu_item_activate (GtkWidget *widget, +clipman_plugin_menu_item_activate (GtkWidget *widget, ClipmanPlugin *clipman_plugin) { g_return_if_fail (G_LIKELY (GTK_IS_WIDGET (widget))); @@ -753,7 +794,7 @@ } static gboolean -clipman_plugin_menu_item_pressed (GtkWidget *widget, +clipman_plugin_menu_item_pressed (GtkWidget *widget, GdkEventButton *event, ClipmanPlugin *clipman_plugin) { @@ -770,7 +811,7 @@ /* Delete item */ else if (event->button == 3) - clipman_plugin_delete (clipman_plugin, clip); + clipman_plugin_delete_clip (clipman_plugin, clip); return TRUE; } @@ -783,7 +824,7 @@ static void clipman_plugin_add_static_with_text (ClipmanPlugin *clipman_plugin, - const gchar *text) + const gchar *text) { /* Dialog */ GtkWidget *dialog = @@ -796,6 +837,8 @@ gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); gtk_window_set_icon_name (GTK_WINDOW (dialog), GTK_STOCK_PASTE); gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 110); + gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dialog), TRUE); + gtk_window_set_decorated (GTK_WINDOW (dialog), FALSE); /* Box */ GtkWidget *vbox = GTK_DIALOG (dialog)->vbox; @@ -836,8 +879,8 @@ } static void -clipman_plugin_delete (ClipmanPlugin *clipman_plugin, - ClipmanClip *clip) +clipman_plugin_delete_clip (ClipmanPlugin *clipman_plugin, + ClipmanClip *clip) { GtkWidget *dialog = gtk_message_dialog_new (NULL, @@ -876,62 +919,24 @@ clipman_clips_delete (clipman_clips, clip); } -static gboolean -clipman_plugin_message_received (ClipmanPlugin *clipman_plugin, - GdkEventClient *ev) +static void +clipman_plugin_clear_history (ClipmanPlugin *clipman_plugin) { - DBG ("Message received"); - if (G_LIKELY (ev->data_format == 8 && *(ev->data.b) != '\0')) - { - if (!g_ascii_strcasecmp (XFCE_CLIPMAN_MESSAGE, ev->data.b)) - { - DBG ("`%s'", ev->data.b); - xfce_panel_plugin_set_panel_hidden (clipman_plugin->panel_plugin, FALSE); - while (gtk_events_pending ()) - gtk_main_iteration (); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (clipman_plugin->button), TRUE); - return TRUE; - } - } - return FALSE; + GtkWidget *dialog = + gtk_message_dialog_new (NULL, + GTK_DIALOG_MODAL, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_YES_NO, + _("Are you sure you want to clear the history?")); + gint result = gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + if (G_UNLIKELY (result != GTK_RESPONSE_YES)) + return; + + clipman_clips_clear_history (clipman_plugin->clipman_clips); } -static gboolean -clipman_plugin_set_selection (ClipmanPlugin *clipman_plugin) -{ - GdkScreen *gscreen; - gchar *selection_name; - Atom selection_atom; - GtkWidget *win; - Window id; - - win = gtk_invisible_new (); - gtk_widget_realize (win); - id = GDK_WINDOW_XID (GTK_WIDGET (win)->window); - - gscreen = gtk_widget_get_screen (win); - selection_name = g_strdup_printf (XFCE_CLIPMAN_SELECTION"%d", - gdk_screen_get_number (gscreen)); - selection_atom = XInternAtom (GDK_DISPLAY (), selection_name, FALSE); - - if (XGetSelectionOwner (GDK_DISPLAY (), selection_atom)) - { - gtk_widget_destroy (win); - return FALSE; - } - - XSelectInput (GDK_DISPLAY (), id, PropertyChangeMask); - XSetSelectionOwner (GDK_DISPLAY (), selection_atom, id, GDK_CURRENT_TIME); - - g_signal_connect_swapped (win, "client-event", - G_CALLBACK (clipman_plugin_message_received), - clipman_plugin); - - return TRUE; -} - - - +/* Clipman Clips functions */ static ClipmanClips * clipman_clips_new (ClipmanPlugin *clipman_plugin) { @@ -942,8 +947,13 @@ clipman_clips->default_clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); clipman_clips->primary_clipboard = gtk_clipboard_get (GDK_SELECTION_PRIMARY); + /* TODO Factorize that stuff somehow, something else than static list atoms */ +#ifdef WITH_LIST_STORE + clipman_clips->history = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT); +#else clipman_clips->history = NULL; clipman_clips->static_clipboard = NULL; +#endif clipman_clips->timeout = g_timeout_add_full (G_PRIORITY_LOW, @@ -955,24 +965,45 @@ return clipman_clips; } +static gboolean +clipman_clips_check_clipboard (ClipmanClips *clipman_clips) +{ + GdkModifierType state; + gchar *text; /* We use the new allocation of + * gtk_clipboard_wait_for_text, + * so no free() on that var */ + + /* Default clipboard */ + text = gtk_clipboard_wait_for_text (clipman_clips->default_clipboard); + if (G_LIKELY (NULL != text)) + clipman_clips_add (clipman_clips, text, DEFAULT); + else if (clipman_clips->prevent_empty == TRUE) + clipman_clips_restore_empty (clipman_clips, DEFAULT); + + /* Primary clipboard */ + if (!clipman_clips->ignore_primary) + { + gdk_window_get_pointer (NULL, NULL, NULL, &state); + if (state & GDK_BUTTON1_MASK) + return TRUE; + + text = gtk_clipboard_wait_for_text (clipman_clips->primary_clipboard); + if (G_LIKELY (NULL != text)) + clipman_clips_add (clipman_clips, text, PRIMARY); + else if (clipman_clips->prevent_empty == TRUE) + clipman_clips_restore_empty (clipman_clips, PRIMARY); + } + + return TRUE; +} + static void clipman_clips_clear_history (ClipmanClips *clipman_clips) { GSList *list; - GtkWidget *dialog = - gtk_message_dialog_new (NULL, - GTK_DIALOG_MODAL, - GTK_MESSAGE_QUESTION, - GTK_BUTTONS_YES_NO, - _("Are you sure you want to clear the history?")); - gint result = gtk_dialog_run (GTK_DIALOG (dialog)); - gtk_widget_destroy (dialog); - if (G_UNLIKELY (result != GTK_RESPONSE_YES)) - return; - for (list = clipman_clips->history; list != NULL; list = list->next) - clipman_clip_free ((ClipmanClip *)list->data); + clipman_clips_free_clip ((ClipmanClip *)list->data); g_slist_free (list); clipman_clips->history = NULL; @@ -1019,41 +1050,9 @@ DBG ("Restore clipboard to `%s'", clip->text); } -static gboolean -clipman_clips_check_clipboard (ClipmanClips *clipman_clips) -{ - GdkModifierType state; - gchar *text; /* We use the new allocation of - * gtk_clipboard_wait_for_text, - * so no free() on that beotche */ - - /* Default clipboard */ - text = gtk_clipboard_wait_for_text (clipman_clips->default_clipboard); - if (G_LIKELY (NULL != text)) - clipman_clips_add (clipman_clips, text, DEFAULT); - else if (clipman_clips->prevent_empty == TRUE) - clipman_clips_restore_empty (clipman_clips, DEFAULT); - - /* Primary clipboard */ - if (!clipman_clips->ignore_primary) - { - gdk_window_get_pointer (NULL, NULL, NULL, &state); - if (state & GDK_BUTTON1_MASK) - return TRUE; - - text = gtk_clipboard_wait_for_text (clipman_clips->primary_clipboard); - if (G_LIKELY (NULL != text)) - clipman_clips_add (clipman_clips, text, PRIMARY); - else if (clipman_clips->prevent_empty == TRUE) - clipman_clips_restore_empty (clipman_clips, PRIMARY); - } - - return TRUE; -} - void clipman_clips_delete (ClipmanClips *clipman_clips, - ClipmanClip *clip) + ClipmanClip *clip) { g_return_if_fail (G_LIKELY (NULL != clip)); @@ -1062,12 +1061,12 @@ else clipman_clips->history = g_slist_remove (clipman_clips->history, clip); - clipman_clip_free (clip); + clipman_clips_free_clip (clip); } static void clipman_clips_add (ClipmanClips *clipman_clips, - gchar *text, + gchar *text, ClipboardType type) { ClipmanClip *clip; @@ -1075,19 +1074,22 @@ g_return_if_fail (G_LIKELY (NULL != text)); - clip = clipman_clip_new (text, type); + clip = clipman_clips_new_clip (text, type); if (type == STATIC) - foobar = g_slist_find_custom (clipman_clips->static_clipboard, clip, (GCompareFunc)clipman_clips_compare); + foobar = g_slist_find_custom (clipman_clips->static_clipboard, clip, + (GCompareFunc)clipman_clips_compare); else if (clipman_clips->behavior == STRICTLY) - foobar = g_slist_find_custom (clipman_clips->history, clip, (GCompareFunc)clipman_clips_compare_with_type); + foobar = g_slist_find_custom (clipman_clips->history, clip, + (GCompareFunc)clipman_clips_compare_with_type); else - foobar = g_slist_find_custom (clipman_clips->history, clip, (GCompareFunc)clipman_clips_compare); + foobar = g_slist_find_custom (clipman_clips->history, clip, + (GCompareFunc)clipman_clips_compare); if (G_UNLIKELY (NULL != foobar)) { /* Free the clip */ - clipman_clip_free (clip); + clipman_clips_free_clip (clip); /* Push the existing clip to the top */ if (type != STATIC) @@ -1107,7 +1109,8 @@ { clipman_clips->history = g_slist_prepend (clipman_clips->history, clip); if (g_slist_length (clipman_clips->history) > clipman_clips->history_length) - clipman_clips_delete (clipman_clips, (ClipmanClip *)(g_slist_last (clipman_clips->history)->data)); + clipman_clips_delete (clipman_clips, + (ClipmanClip *)(g_slist_last (clipman_clips->history)->data)); } } @@ -1129,12 +1132,9 @@ return -1; } - - - static ClipmanClip * -clipman_clip_new (gchar *text, - ClipboardType type) +clipman_clips_new_clip (gchar *text, + ClipboardType type) { ClipmanClip *clip = g_slice_new (ClipmanClip); clip->type = type; @@ -1144,7 +1144,7 @@ } static void -clipman_clip_free (ClipmanClip *clip) +clipman_clips_free_clip (ClipmanClip *clip) { g_return_if_fail (G_LIKELY (NULL != clip)); g_free (clip->text); Modified: xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman.h =================================================================== --- xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman.h 2008-07-09 00:52:31 UTC (rev 5035) +++ xfce4-clipman-plugin/branches/mmassonnet/panel-plugin/clipman.h 2008-07-09 10:40:08 UTC (rev 5036) @@ -52,6 +52,16 @@ /* Milisecond to check the clipboards(s) */ #define TIMER_INTERVAL 1000 +/* crap */ +enum +{ + COLUMN_TEXT, + COLUMN_SHORT_TEXT, + COLUMN_TYPE, + N_COLUMNS, +}; +/* end crap */ + typedef enum { DEFAULT, @@ -99,8 +109,12 @@ gint timeout; +#ifdef WITH_LIST_STORE + GtkListStore *history; +#else GSList *history; GSList *static_clipboard; +#endif ClipboardBehavior behavior; gint history_length; From mvd at xfce.org Wed Jul 9 12:48:27 2008 From: mvd at xfce.org (Maxim Dziumanenko) Date: Wed, 9 Jul 2008 10:48:27 +0000 (UTC) Subject: [Goodies-commits] r5037 - gsynaptics-mcs-plugin/trunk/po ristretto/trunk/po xfburn/trunk/po xfce4-datetime-plugin/trunk/po xfce4-dict/trunk/po xfce4-fsguard-plugin/trunk/po xfce4-mailwatch-plugin/trunk/po Message-ID: <20080709104827.29929F29E3@mocha.foo-projects.org> Author: mvd Date: 2008-07-09 10:48:27 +0000 (Wed, 09 Jul 2008) New Revision: 5037 Added: ristretto/trunk/po/uk.po Modified: gsynaptics-mcs-plugin/trunk/po/uk.po ristretto/trunk/po/LINGUAS xfburn/trunk/po/uk.po xfce4-datetime-plugin/trunk/po/uk.po xfce4-dict/trunk/po/uk.po xfce4-fsguard-plugin/trunk/po/uk.po xfce4-mailwatch-plugin/trunk/po/uk.po Log: Maxim Dziumanenko Updated Ukrainian translation Modified: gsynaptics-mcs-plugin/trunk/po/uk.po =================================================================== --- gsynaptics-mcs-plugin/trunk/po/uk.po 2008-07-09 10:40:08 UTC (rev 5036) +++ gsynaptics-mcs-plugin/trunk/po/uk.po 2008-07-09 10:48:27 UTC (rev 5037) @@ -2,23 +2,23 @@ # Copyright (C) 2007 Dmitry Nikitin # This file is distributed under the same license as the gsynaptics-mcs-plugin package. # -# Dmitry Nikitin , 2007. +# Dmitry Nikitin , 2007, 2008. msgid "" msgstr "" "Project-Id-Version: gsynaptics-mcs-plugin\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-12-29 15:23+0100\n" -"PO-Revision-Date: 2007-03-02 14:12+0200\n" +"POT-Creation-Date: 2008-07-09 13:17+0000\n" +"PO-Revision-Date: 2008-07-08 14:50+0300\n" "Last-Translator: Dmitry Nikitin \n" -"Language-Team: Ukrainian \n" +"Language-Team: Ukrainian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #. the button label in the xfce-mcs-manager dialog -#: ../src/gsynaptics-plugin.c:54 +#: ../src/gsynaptics-plugin.c:55 msgid "Button Label|Synaptics settings" -msgstr "?????? ?????|Synaptics ???????????" - +msgstr "??????????? Synaptics" Modified: ristretto/trunk/po/LINGUAS =================================================================== --- ristretto/trunk/po/LINGUAS 2008-07-09 10:40:08 UTC (rev 5036) +++ ristretto/trunk/po/LINGUAS 2008-07-09 10:48:27 UTC (rev 5037) @@ -1,2 +1,2 @@ # set of available languages (in alphabetic order) -bg cs de el en_GB fi fr gl hu id it lv nb_NO nl pt_BR pt_PT ru sk tr ur zh_CN +bg cs de el en_GB fi fr gl hu id it lv nb_NO nl pt_BR pt_PT ru sk tr uk ur zh_CN Added: ristretto/trunk/po/uk.po =================================================================== --- ristretto/trunk/po/uk.po (rev 0) +++ ristretto/trunk/po/uk.po 2008-07-09 10:48:27 UTC (rev 5037) @@ -0,0 +1,279 @@ +# Ukrainian translation of ristretto package. +# This file is distributed under the same license as the ristretto package. +# +# Dmitry Nikitin , 2008. +#: ../src/main.c:231 +msgid "" +msgstr "" +"Project-Id-Version: ristretto\n" +"Report-Msgid-Bugs-To: xfce-i18n at xfce.org\n" +"POT-Creation-Date: 2008-07-09 13:26+0000\n" +"PO-Revision-Date: 2008-07-08 14:53+0300\n" +"Last-Translator: Dmitry Nikitin \n" +"Language-Team: Ukrainian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#: ../src/main.c:61 +msgid "Version information" +msgstr "?????????? ??? ??????" + +#: ../src/main.c:65 +msgid "Start in fullscreen mode" +msgstr "????????? ? ?????????????? ??????" + +#: ../src/main.c:69 +msgid "Start a slideshow" +msgstr "?????????? ? ?????-???" + +#: ../src/main.c:235 +#, c-format +msgid "" +"%s: %s\n" +"Try %s --help to see a full list of available command line options.\n" +msgstr "" +"%s: %s\n" +"????????? %s --help ??? ????????? ??????? ?????? ?????????? ????????? " +"???????.\n" + +#: ../src/main.c:448 ../src/main_window.c:1636 ../src/main_window.c:1676 +#: ../src/main_window.c:1713 +msgid "Opening file(s)..." +msgstr "????????????? ????(?)..." + +#. Create 'File' menu +#: ../src/main_window.c:340 +msgid "_File" +msgstr "_????" + +#: ../src/main_window.c:347 +msgid "O_pen Folder" +msgstr "_???????? ????" + +#: ../src/main_window.c:348 +msgid "_Recently used" +msgstr "_????????? ???????????" + +#: ../src/main_window.c:353 +msgid "Close _all" +msgstr "??????? ?_??" + +#. Create 'Edit' menu +#: ../src/main_window.c:383 +msgid "_Edit" +msgstr "_??????????" + +#: ../src/main_window.c:388 ../src/main_window.c:686 +msgid "Open with..." +msgstr "???????? ?..." + +#: ../src/main_window.c:396 ../src/main_window.c:697 +msgid "No applications available" +msgstr "????? ????????? ???????" + +#. Create 'View' menu +#: ../src/main_window.c:405 +msgid "_View" +msgstr "_????????" + +#: ../src/main_window.c:412 +msgid "Show _Toolbar" +msgstr "???????? ?_?????" + +#: ../src/main_window.c:413 +msgid "Thumbnail _Viewer" +msgstr "?????????? _????????" + +#: ../src/main_window.c:417 +msgid "_Zooming" +msgstr "_?????????????" + +#: ../src/main_window.c:418 +msgid "_Rotate" +msgstr "_?????????" + +#: ../src/main_window.c:425 +msgid "_Set as wallpaper" +msgstr "?_????????? ?? ???????" + +#: ../src/main_window.c:503 +msgid "Show _Horizontally" +msgstr "??????????? _?????????????" + +#: ../src/main_window.c:507 +msgid "Show _Vertically" +msgstr "??????????? _???????????" + +#: ../src/main_window.c:511 +msgid "H_ide" +msgstr "?_??????" + +#: ../src/main_window.c:548 +msgid "Rotate _Right" +msgstr "????????? ?_?????" + +#: ../src/main_window.c:549 +msgid "Rotate _Left" +msgstr "????????? ?_????" + +#. Create 'Go' menu +#: ../src/main_window.c:570 +msgid "_Go" +msgstr "?_??????" + +#. Create 'Help' menu +#: ../src/main_window.c:601 +msgid "_Help" +msgstr "???_????" + +#: ../src/main_window.c:933 +msgid "One or more images have been modified, do you want to save the changes?" +msgstr "???? ??? ?????? ????????? ???? ???????, ??????? ???????? ??????" + +#: ../src/main_window.c:1420 +msgid "Image viewer Preferences" +msgstr "???????????? ??????????? ?????????" + +#: ../src/main_window.c:1438 +msgid "Behaviour" +msgstr "?????????" + +#: ../src/main_window.c:1442 +msgid "Slideshow" +msgstr "?????-???" + +#: ../src/main_window.c:1446 +msgid "Display" +msgstr "????????????" + +#: ../src/main_window.c:1451 +msgid "Scaling" +msgstr "?????????????" + +#: ../src/main_window.c:1453 +msgid "Don't scale over 100% when maximizing the window." +msgstr "?? ???????????? ?????? 100%, ???? ?????????? ?????." + +#: ../src/main_window.c:1463 +msgid "Background Color" +msgstr "????? ???" + +#: ../src/main_window.c:1465 +msgid "_Override Background Color:" +msgstr "_???????? ????? ???:" + +#: ../src/main_window.c:1488 +msgid "Image Cache" +msgstr "??? ?????????" + +#: ../src/main_window.c:1491 +msgid "Cache size:" +msgstr "?????? ????:" + +#: ../src/main_window.c:1492 +msgid "MB" +msgstr "??" + +#: ../src/main_window.c:1508 +msgid "Timeout" +msgstr "????????" + +#: ../src/main_window.c:1511 +msgid "Preload" +msgstr "????????? ????????????" + +#: ../src/main_window.c:1514 +msgid "Thumbnails" +msgstr "??????" + +#: ../src/main_window.c:1520 +msgid "" +"The time period an individual image is displayed during a slideshow\n" +"(in seconds)" +msgstr "" +"?????????? ?????? ???????? ?????????? ? ?????-???\n" +"(? ????????)" + +#: ../src/main_window.c:1524 +msgid "" +"Preload images during slideshow\n" +"(uses more memory)" +msgstr "" +"?????????? ????????????? ?????????? ??? ??? ?????-???\n" +"(???????? ?????? ???'???)" + +#: ../src/main_window.c:1525 +msgid "_Preload images" +msgstr "????????? ???????_????? ?????????" + +#: ../src/main_window.c:1527 +msgid "Hide the thumbnails bar during slideshow" +msgstr "?????? ?????? ??????? ??? ??? ?????-???" + +#: ../src/main_window.c:1528 +msgid "_Hide thumbnails" +msgstr "_?????? ??????" + +#: ../src/main_window.c:1594 +msgid "Developer:" +msgstr "?????????:" + +#: ../src/main_window.c:1604 +msgid "" +"Ristretto is a fast and lightweight picture-viewer for the Xfce desktop " +"environment." +msgstr "" +"Ristretto - ??????? ? ?????? ?????????? ????????? ??? ???????? ?????????? " +"Xfce" + +#: ../src/main_window.c:1612 +msgid "translator-credits" +msgstr "Dmitry Nikitin " + +#: ../src/main_window.c:1638 +msgid "Open image" +msgstr "???????? ??????????" + +#: ../src/main_window.c:1656 +msgid "Could not open file" +msgstr "????????? ???????? ????" + +#: ../src/main_window.c:1678 +msgid "Open folder" +msgstr "???????? ????" + +#: ../src/main_window.c:1753 +msgid "" +"Are you sure you want to clear ristretto's list of recently opened documents?" +msgstr "" +"?? ????????, ?? ??????? ???????? ?????? ????????? ????????? ???????????" + +#: ../src/thumbnail_bar.c:185 +msgid "Spacing" +msgstr "????????" + +#: ../src/thumbnail_bar.c:186 +msgid "The amount of space between the thumbnails" +msgstr "?????? ????????? ??? ????????" + +#: ../src/thumbnail_bar.c:192 +msgid "Border Width" +msgstr "?????? ?????" + +#: ../src/thumbnail_bar.c:193 +msgid "The border width of the thumbnail-bar" +msgstr "?????? ????? ?????? ???????" + +#: ../ristretto.desktop.in.h:1 +msgid "Image Viewer" +msgstr "?????????? ?????????" + +#: ../ristretto.desktop.in.h:2 +msgid "Ristretto" +msgstr "?????????? Ristretto" + +#: ../ristretto.desktop.in.h:3 +msgid "Xfce Image viewer" +msgstr "?????????? ????????? Xfce" Modified: xfburn/trunk/po/uk.po =================================================================== --- xfburn/trunk/po/uk.po 2008-07-09 10:40:08 UTC (rev 5036) +++ xfburn/trunk/po/uk.po 2008-07-09 10:48:27 UTC (rev 5037) @@ -3,16 +3,16 @@ # This file is distributed under the same license as the xfburn package. # # Maxim V. Dziumanenko , 2006. -# Dmitry Nikitin , 2007. -#: ../xfburn/xfburn-device-box.c:617 +# Dmitry Nikitin , 2007, 2008. +#: ../xfburn/xfburn-device-box.c:664 msgid "" msgstr "" "Project-Id-Version: xfburn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-05-29 23:00-0600\n" -"PO-Revision-Date: 2007-03-14 19:39+0200\n" +"POT-Creation-Date: 2008-07-09 13:38+0000\n" +"PO-Revision-Date: 2008-07-08 16:05+0300\n" "Last-Translator: Dmitry Nikitin \n" -"Language-Team: Ukrainian \n" +"Language-Team: Ukrainian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -20,199 +20,251 @@ "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: KBabel 1.11.4\n" -#: ../xfburn/xfburn-adding-progress.c:89 +#: ../xfburn/xfburn-adding-progress.c:111 msgid "Adding files to the composition" msgstr "????????? ?????? ?? ???????" -#: ../xfburn/xfburn-blank-cd-dialog.c:95 ../xfburn/xfburn-main-window.c:127 +#: ../xfburn/xfburn-blank-dialog.c:145 ../xfburn/xfburn-main-window.c:127 msgid "Blank CD-RW" msgstr "???????? CD-RW" -#: ../xfburn/xfburn-blank-cd-dialog.c:106 -#: ../xfburn/xfburn-burn-image-dialog.c:169 +#: ../xfburn/xfburn-blank-dialog.c:157 +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:164 +#: ../xfburn/xfburn-burn-image-dialog.c:170 #: ../xfburn/xfburn-copy-cd-dialog.c:131 #: ../xfburn/xfburn-copy-dvd-dialog.c:131 #: ../xfburn/xfburn-format-dvd-dialog.c:102 msgid "Burning device" msgstr "???????? ??????" -#: ../xfburn/xfburn-blank-cd-dialog.c:112 -msgid "Fast" -msgstr "??????" +#: ../xfburn/xfburn-blank-dialog.c:170 ../xfburn/xfburn-device-box.c:198 +msgid "Blank mode" +msgstr "????? ????????" -#: ../xfburn/xfburn-blank-cd-dialog.c:113 -msgid "Complete" -msgstr "?????" - -#: ../xfburn/xfburn-blank-cd-dialog.c:117 -msgid "Blank type" -msgstr "??? ????????" - -#: ../xfburn/xfburn-blank-cd-dialog.c:125 -#: ../xfburn/xfburn-burn-image-dialog.c:177 +#: ../xfburn/xfburn-blank-dialog.c:178 +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:196 +#: ../xfburn/xfburn-burn-image-dialog.c:178 #: ../xfburn/xfburn-copy-cd-dialog.c:139 #: ../xfburn/xfburn-copy-dvd-dialog.c:139 #: ../xfburn/xfburn-format-dvd-dialog.c:110 msgid "Options" msgstr "?????????" -#: ../xfburn/xfburn-blank-cd-dialog.c:129 -#: ../xfburn/xfburn-burn-image-dialog.c:181 +#: ../xfburn/xfburn-blank-dialog.c:182 +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:200 +#: ../xfburn/xfburn-burn-image-dialog.c:182 #: ../xfburn/xfburn-copy-cd-dialog.c:143 #: ../xfburn/xfburn-copy-dvd-dialog.c:143 #: ../xfburn/xfburn-format-dvd-dialog.c:114 msgid "E_ject disk" msgstr "_????????? ????" -#: ../xfburn/xfburn-blank-cd-dialog.c:139 +#: ../xfburn/xfburn-blank-dialog.c:192 msgid "_Blank" msgstr "?_???????" -#: ../xfburn/xfburn-blank-cd-dialog.c:173 -#: ../xfburn/xfburn-burn-image-dialog.c:325 -#: ../xfburn/xfburn-burn-image-dialog.c:522 -msgid "Unable to grab drive" -msgstr "????????? ???????? ???????????" - -#: ../xfburn/xfburn-blank-cd-dialog.c:189 +#. blanking can only be performed on blank discs, format and deformat are allowed to be blank ones +#: ../xfburn/xfburn-blank-dialog.c:298 msgid "The inserted disc is already blank" msgstr "?????????? ???? ??? ??????" #. these ones we can blank -#: ../xfburn/xfburn-blank-cd-dialog.c:194 +#: ../xfburn/xfburn-blank-dialog.c:304 msgid "Ready" msgstr "??????" -#: ../xfburn/xfburn-blank-cd-dialog.c:197 +#: ../xfburn/xfburn-blank-dialog.c:307 msgid "No disc detected in the drive" msgstr "? ???????? ????????? ???????-????" -#: ../xfburn/xfburn-blank-cd-dialog.c:200 -msgid "Cannot recognize drive and media state" -msgstr "????????? ?????????? ??????????? ? ???? ?????" - -#: ../xfburn/xfburn-blank-cd-dialog.c:205 +#: ../xfburn/xfburn-blank-dialog.c:316 msgid "Media is not erasable" msgstr "????? ??? ?????????? ????????" -#: ../xfburn/xfburn-blank-cd-dialog.c:212 +#: ../xfburn/xfburn-blank-dialog.c:356 msgid "Blanking disc..." msgstr "???????? ?????..." -#: ../xfburn/xfburn-blank-cd-dialog.c:223 +#: ../xfburn/xfburn-blank-dialog.c:383 +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:406 +#: ../xfburn/xfburn-perform-burn.c:232 +#, c-format msgid "Done" msgstr "?????????" -#: ../xfburn/xfburn-burn-image-dialog.c:133 -#, fuzzy +#: ../xfburn/xfburn-blank-dialog.c:386 ../xfburn/xfburn-perform-burn.c:235 +#: ../xfburn/xfburn-progress-dialog.c:561 +msgid "Failure" +msgstr "???????" + +#: ../xfburn/xfburn-blank-dialog.c:409 +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:508 +#: ../xfburn/xfburn-burn-image-dialog.c:330 +#: ../xfburn/xfburn-burn-image-dialog.c:528 +msgid "Unable to grab drive" +msgstr "????????? ???????? ???????????" + +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:152 +msgid "Burn Composition" +msgstr "????? ???????" + +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:175 +msgid "Composition name" +msgstr "????? ???????" + +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:180 +msgid "Would you like to change the default composition name?" +msgstr "??????? ?????? ????? ????????" + +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:205 +#: ../xfburn/xfburn-burn-image-dialog.c:187 +#: ../xfburn/xfburn-copy-cd-dialog.c:148 +#: ../xfburn/xfburn-copy-dvd-dialog.c:148 +msgid "_Dummy write" +msgstr "_????????? ?????" + +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:209 +#: ../xfburn/xfburn-burn-image-dialog.c:191 +msgid "Burn_Free" +msgstr "??????_??????" + +#. create ISO ? +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:215 +#: ../xfburn/xfburn-copy-cd-dialog.c:157 +#: ../xfburn/xfburn-copy-dvd-dialog.c:157 +msgid "Only create _ISO" +msgstr "???? ???????? _ISO" + +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:252 +msgid "_Burn Composition" +msgstr "_???????? ??????" + +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:369 +#, c-format +msgid "Could not create destination ISO file: %s" +msgstr "?? ???????? ???????? ???????? ISO-????: %s" + +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:376 +msgid "Writing ISO..." +msgstr "????? ISO..." + +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:388 +#, c-format +msgid "An error occured while writing ISO: %s" +msgstr "??????? ??? ??? ?????? ISO: %s" + +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:439 +#: ../xfburn/xfburn-burn-image-dialog.c:295 +msgid "Unable to create disc object" +msgstr "????????? ???????? ??'??? ?? ?????" + +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:444 +#: ../xfburn/xfburn-burn-image-dialog.c:323 +msgid "Cannot attach source object to track object" +msgstr "????????? ?????? ??? ??'??? ?? ???????" + +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:471 +msgid "The write mode is not supported currently" +msgstr "???????? ????? ?????? ?? ?????????????" + +#. could not create source +#: ../xfburn/xfburn-burn-data-composition-base-dialog.c:552 +msgid "Could not create ISO source structure" +msgstr "?? ???????? ???????? ISO-?????????" + +#: ../xfburn/xfburn-burn-image-dialog.c:134 msgid "Burn image" -msgstr "_???????? ?????" +msgstr "???????? ?????" #. file -#: ../xfburn/xfburn-burn-image-dialog.c:140 -#: ../xfburn/xfburn-burn-image-dialog.c:153 +#: ../xfburn/xfburn-burn-image-dialog.c:141 +#: ../xfburn/xfburn-burn-image-dialog.c:154 msgid "Image to burn" msgstr "????? ??? ??????" -#: ../xfburn/xfburn-burn-image-dialog.c:144 +#: ../xfburn/xfburn-burn-image-dialog.c:145 msgid "All files" msgstr "??? ?????" -#: ../xfburn/xfburn-burn-image-dialog.c:148 +#: ../xfburn/xf