[Xfce4-commits] xfce4-weather-plugin:master l10n: Updated Serbian (sr) translation to 100%
Updating branch refs/heads/master to a2feee4e40c5e2f2f17da7be5caa2be934f4f28a (commit) from 2cc47a64dac813c4a2c1ce4c6a7e54f4c832e047 (commit) commit a2feee4e40c5e2f2f17da7be5caa2be934f4f28a Author: Саша Петровић salepetron...@gmail.com Date: Sun Sep 16 09:57:36 2012 +0200 l10n: Updated Serbian (sr) translation to 100% New status: 175 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/sr.po | 271 +++-- 1 files changed, 155 insertions(+), 116 deletions(-) diff --git a/po/sr.po b/po/sr.po index d1668b8..e10cbc1 100644 --- a/po/sr.po +++ b/po/sr.po @@ -2,20 +2,23 @@ # Copyright (C) 2012 THE xfce4-weather-plugin'S COPYRIGHT HOLDER # This file is distributed under the same license as the xfce4-weather-plugin package. # h.j...@gmx.at, 2012. -# +# Саша Петровић salepetron...@gmail.com, 2012. +# msgid msgstr Project-Id-Version: xfce4-weather-plugin 0.8.1git-9f0895e\n Report-Msgid-Bugs-To: \n POT-Creation-Date: 2012-08-22 20:56+0200\n -PO-Revision-Date: 2012-08-22 20:58+0200\n -Last-Translator: h.j...@gmx.at\n -Language-Team: Serbian\n +PO-Revision-Date: 2012-09-16 09:47+0200\n +Last-Translator: Саша Петровић salepetron...@gmail.com\n +Language-Team: српски xfce-i...@xfce.org\n MIME-Version: 1.0\n Content-Type: text/plain; charset=UTF-8\n Content-Transfer-Encoding: 8bit\n Language: sr\n -Plural-Forms: nplurals=3; plural=(n%10==1 n%100!=11 ? 0 : n%10=2 n%10=4 (n%10010 || n%100=20) ? 1 : 2);\n +Plural-Forms: nplurals=3; plural=(n%10==1 n%100!=11 ? 0 : n%10=2 (n +%10010 || n%100=20) ? 1 : 2);\n +X-Generator: Gtranslator 2.91.5\n #. TRANSLATORS: Keep in sync with labeloptions in weather-config.c #: ../panel-plugin/weather.c:138 @@ -44,27 +47,27 @@ msgstr В #: ../panel-plugin/weather.c:159 msgid CL -msgstr +msgstr ОН #: ../panel-plugin/weather.c:162 msgid CM -msgstr +msgstr ОС #: ../panel-plugin/weather.c:165 msgid CH -msgstr +msgstr ОВ #: ../panel-plugin/weather.c:168 msgid C -msgstr +msgstr О #: ../panel-plugin/weather.c:171 msgid F -msgstr +msgstr М #: ../panel-plugin/weather.c:174 msgid R -msgstr +msgstr К #: ../panel-plugin/weather.c:277 ../panel-plugin/weather.c:281 msgid No Data @@ -103,7 +106,7 @@ msgstr Сунце излази у %s и залази у %s. #. * vertical alignment of the icon - which unfortunately cannot #. * be changed easily - and try to make it compact and look #. * good! -#. +#. #: ../panel-plugin/weather.c:928 #, c-format msgid @@ -118,10 +121,19 @@ msgid \n span size=\smaller\%s/span msgstr +bspan size=\large\%s/span/b span size=\medium\(%s)/span\n +bspan size=\large\%s/span/b\n +span size=\smaller\од %s ка %s, падавине /span\n +\n +bТемпература/b %s\t\tspan size=\smaller\(вредност у %s)/span\n +bПритисак:/b %sbВлажност:/b%s\n +bМагла:/b %sbОблачност:/b %s\n +\n +span size=\smaller\%s/span #: ../panel-plugin/weather.c:982 msgid Cannot update weather data -msgstr Не успевам ажурирати податке о временској прогнози +msgstr Нисам успео ажурирати податке о временској прогнози #. add forecast window to right click menu, for people who missed #. the left mouse click feature @@ -136,7 +148,7 @@ msgstr _Прогноза #. * read that up somewhere and decide whether you want to use them #. * or not. In general, though, you should just try to choose #. * letter(s) that make sense and don't use up too much space. -#. +#. #: ../panel-plugin/weather-config.c:49 msgid Temperature (T) msgstr Температура(Т) @@ -206,9 +218,9 @@ msgid You may edit the location name to your liking.\n To choose another location, please use the \Change\ button. msgstr -Географска ширина: %s, географска дужина %s\r\n -\r\n -Можете уредити назив положаја по својој вољи.\r\n +Географска ширина: %s, географска дужина %s\n +\n +Можете уредити назив положаја по својој вољи.\n Да би изабрали други положај, молим, употребите дугме „Измени“. #: ../panel-plugin/weather-config.c:390 @@ -248,7 +260,7 @@ msgstr Сервер _посредника: #: ../panel-plugin/weather-config.c:548 msgid Use proxy _server -msgstr Користи сервер посредника +msgstr Користи _сервер посредника #: ../panel-plugin/weather-config.c:550 msgid Auto-detect from _environment @@ -289,49 +301,51 @@ msgstr Анимирај _прелазе између ознака #: ../panel-plugin/weather-data.c:143 msgid ft -msgstr +msgstr ft #: ../panel-plugin/weather-data.c:143 msgid m -msgstr +msgstr m #: ../panel-plugin/weather-data.c:145 msgid °F -msgstr +msgstr °F #: ../panel-plugin/weather-data.c:145 msgid °C -msgstr +msgstr °C #: ../panel-plugin/weather-data.c:147 msgid psi -msgstr +msgstr psi #: ../panel-plugin/weather-data.c:147 msgid hPa -msgstr +msgstr hPa #: ../panel-plugin/weather-data.c:149 msgid mph -msgstr +msgstr mph #: ../panel-plugin/weather-data.c:149 msgid km/h -msgstr +msgstr km/h #:
[Xfce4-commits] mousepad:master l10n: Updated Spanish (Castilian) (es) translation to 78%
Updating branch refs/heads/master to 21bbf0bfde7e3d52b7fc8dfc30ce3dc3067d6a42 (commit) from 627b82fe7d05ccafd7cd418dfbe250b981218842 (commit) commit 21bbf0bfde7e3d52b7fc8dfc30ce3dc3067d6a42 Author: prflr88 prfl...@gmail.com Date: Sun Sep 16 11:52:39 2012 +0200 l10n: Updated Spanish (Castilian) (es) translation to 78% New status: 194 messages complete with 0 fuzzies and 53 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/es.po | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/po/es.po b/po/es.po index 02d62ff..dc87447 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid msgstr Project-Id-Version: mousepad\n Report-Msgid-Bugs-To: \n -POT-Creation-Date: 2012-09-09 16:24+\n +POT-Creation-Date: 2012-09-16 08:54+\n PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n Last-Translator: FULL NAME EMAIL@ADDRESS\n Language-Team: Spanish/es xfce-i...@xfce.org\n @@ -972,7 +972,9 @@ msgstr #. add the label with the root warning #: ../mousepad/mousepad-window.c:662 msgid Warning, you are using the root account, you may harm your system. -msgstr Peligro: Usted esá usando la cuenta de administrador (Root), podríadañar su equipo +msgstr +Peligro: Usted esá usando la cuenta de administrador (Root), podríadañar su +equipo #. show the warning #: ../mousepad/mousepad-window.c:1100 @@ -1017,7 +1019,7 @@ msgstr Abrir '%s' #: ../mousepad/mousepad-window.c:2727 msgid Failed to clear the recent history -msgstr +msgstr Fallo al limpiar el historial #. create an item to inform the user #: ../mousepad/mousepad-window.c:3151 @@ -1040,12 +1042,12 @@ msgstr #. set error message #: ../mousepad/mousepad-window.c:3518 msgid Reading the template failed, the menu item has been removed -msgstr +msgstr Fallo al leer plantilla, el ítem del menú ha sido removido #. set error message #: ../mousepad/mousepad-window.c:3523 msgid Loading the template failed -msgstr +msgstr Fallo al cargar plantilla #. create new file chooser dialog #: ../mousepad/mousepad-window.c:3548 @@ -1067,7 +1069,7 @@ msgstr Fallo al abrir el archivo #. show the error #: ../mousepad/mousepad-window.c:3771 ../mousepad/mousepad-window.c:3894 msgid Failed to save the document -msgstr +msgstr Fallo al salvar el documento #. create the dialog #: ../mousepad/mousepad-window.c:3795 @@ -1077,7 +1079,7 @@ msgstr Guardar como #. show the error #: ../mousepad/mousepad-window.c:3986 msgid Failed to reload the document -msgstr +msgstr Fallo al recargar el documento #. show the error #: ../mousepad/mousepad-window.c:4013 ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master l10n: Updated Spanish (Castilian) (es) translation to 84%
Updating branch refs/heads/master to 56dda9a111a2d6ead8f31a6e0df2cafbcd6af2bb (commit) from 21bbf0bfde7e3d52b7fc8dfc30ce3dc3067d6a42 (commit) commit 56dda9a111a2d6ead8f31a6e0df2cafbcd6af2bb Author: prflr88 prfl...@gmail.com Date: Sun Sep 16 12:02:24 2012 +0200 l10n: Updated Spanish (Castilian) (es) translation to 84% New status: 209 messages complete with 0 fuzzies and 38 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/es.po | 30 +++--- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/po/es.po b/po/es.po index dc87447..3a1fc07 100644 --- a/po/es.po +++ b/po/es.po @@ -775,23 +775,23 @@ msgstr #: ../mousepad/mousepad-window.c:447 msgid Convert all the leading spaces to tabs in the selected line(s) or document -msgstr +msgstr Convierte todos los espacios iniciales en pestañas en las línea(s) seleccionadas o documento #: ../mousepad/mousepad-window.c:448 msgid St_rip Trailing Spaces -msgstr +msgstr Qui_tar espacios finales #: ../mousepad/mousepad-window.c:448 msgid Remove all the trailing spaces from the selected line(s) or document -msgstr +msgstr Retire todos los espacios al final de la línea seleccionada (s) o documento #: ../mousepad/mousepad-window.c:449 msgid _Transpose -msgstr +msgstr _Transponer #: ../mousepad/mousepad-window.c:449 msgid Reverse the order of something -msgstr +msgstr Revierte el orden de algo #: ../mousepad/mousepad-window.c:450 msgid _Move Selection @@ -803,7 +803,7 @@ msgstr Linea _arriba #: ../mousepad/mousepad-window.c:451 msgid Move the selection one line up -msgstr +msgstr Mueve lo seleccionado una línea arriba #: ../mousepad/mousepad-window.c:452 msgid Line _Down @@ -811,7 +811,7 @@ msgstr Linea _abajo #: ../mousepad/mousepad-window.c:452 msgid Move the selection one line down -msgstr +msgstr Mueve lo seleccionado una linea abajo #: ../mousepad/mousepad-window.c:453 msgid D_uplicate Line / Selection @@ -819,7 +819,7 @@ msgstr Du_plica linea/Selección #: ../mousepad/mousepad-window.c:453 msgid Duplicate the current line or selection -msgstr +msgstr Clona la actual línea seleccionada #: ../mousepad/mousepad-window.c:454 msgid _Increase Indent @@ -827,7 +827,7 @@ msgstr _Incrementar identación #: ../mousepad/mousepad-window.c:454 msgid Increase the indentation of the selection or current line -msgstr +msgstr Incrementa la identación en la línea seleccionada actualmente #: ../mousepad/mousepad-window.c:455 msgid _Decrease Indent @@ -835,7 +835,7 @@ msgstr _Reducir identación #: ../mousepad/mousepad-window.c:455 msgid Decrease the indentation of the selection or current line -msgstr +msgstr Decrementa la identación en la línea actualmente seleccionada #: ../mousepad/mousepad-window.c:457 msgid _Document @@ -879,7 +879,7 @@ msgstr _Ir a... #: ../mousepad/mousepad-window.c:465 msgid Go to a specific location in the document -msgstr +msgstr Ir a un lugar específico en el documento #: ../mousepad/mousepad-window.c:467 msgid _Help @@ -891,7 +891,7 @@ msgstr _Contenidos #: ../mousepad/mousepad-window.c:468 msgid Display the Mousepad user manual -msgstr +msgstr Muestra el manual de Mousepad #: ../mousepad/mousepad-window.c:469 msgid About this application @@ -1028,7 +1028,7 @@ msgstr No hay datos en el portapapeles #: ../mousepad/mousepad-window.c:3222 msgid Turn off color schemes -msgstr +msgstr Deshabilitar esquemas de color #: ../mousepad/mousepad-window.c:3303 msgid No filetype @@ -1037,7 +1037,7 @@ msgstr Sin tipo de archivo #. set error message #: ../mousepad/mousepad-window.c:3510 msgid Templates should be UTF-8 valid -msgstr +msgstr Plantillas debe ser UTF-8 válido #. set error message #: ../mousepad/mousepad-window.c:3518 @@ -1059,7 +1059,7 @@ msgstr Abrir carpeta msgid Failed to open \%s\ for reading. It will be removed from the document history -msgstr +msgstr Fallo al abrir \%s\ para su lectura, Este será removido del historial del documento #. show the warning and cleanup #: ../mousepad/mousepad-window.c:3665 ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:nick/multiple-file-properties Finalize permission handing for multiple files.
Updating branch refs/heads/nick/multiple-file-properties to 0156959702eaf110e64532d44876033fc41fc617 (commit) from 97ee43c303a0dea76f42ea17e933e24d2d1ca8cf (commit) commit 0156959702eaf110e64532d44876033fc41fc617 Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 17:30:39 2012 +0200 Finalize permission handing for multiple files. thunar/thunar-deep-count-job.c |3 +- thunar/thunar-permissions-chooser.c | 67 ++ 2 files changed, 45 insertions(+), 25 deletions(-) diff --git a/thunar/thunar-deep-count-job.c b/thunar/thunar-deep-count-job.c index 5a8f7ed..6613dfe 100644 --- a/thunar/thunar-deep-count-job.c +++ b/thunar/thunar-deep-count-job.c @@ -1,6 +1,7 @@ /* vi:set sw=2 sts=2 ts=2 et ai: */ /*- - * Copyright (c) 2009 Jannis Pohlmann jan...@xfce.org. + * Copyright (c) 2009 Jannis Pohlmann jan...@xfce.org + * Copyright (c) 2012 Nick Schermer n...@xfce.org * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/thunar/thunar-permissions-chooser.c b/thunar/thunar-permissions-chooser.c index 5ebcc93..552b5c2 100644 --- a/thunar/thunar-permissions-chooser.c +++ b/thunar/thunar-permissions-chooser.c @@ -2,6 +2,7 @@ /*- * Copyright (c) 2005-2006 Benedikt Meurer be...@xfce.org * Copyright (c) 2009 Jannis Pohlmann jan...@xfce.org + * Copyright (c) 2012 Nick Schermer n...@xfce.org * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free @@ -84,7 +85,7 @@ static void thunar_permissions_chooser_set_property (GObject static gint thunar_permissions_chooser_ask_recursive (ThunarPermissionsChooser *chooser); static void thunar_permissions_chooser_change_group (ThunarPermissionsChooser *chooser, guint32 gid); -static void thunar_permissions_chooser_change_mode (ThunarPermissionsChooser *chooser, +static gboolean thunar_permissions_chooser_change_mode (ThunarPermissionsChooser *chooser, ThunarFileMode dir_mask, ThunarFileMode dir_mode, ThunarFileMode file_mask, @@ -194,8 +195,6 @@ static void thunar_permissions_chooser_init (ThunarPermissionsChooser *chooser) { GtkCellRenderer *renderer_text; - GtkListStore*store; - GtkTreeIter iter; GtkWidget *separator; GtkWidget *button; GtkWidget *label; @@ -206,13 +205,6 @@ thunar_permissions_chooser_init (ThunarPermissionsChooser *chooser) /* setup the chooser */ gtk_container_set_border_width (GTK_CONTAINER (chooser), 12); - /* allocate the store for the permission combos */ - store = gtk_list_store_new (1, G_TYPE_STRING); - gtk_list_store_insert_with_values (store, iter, 0, 0, _(None), -1); /* */ - gtk_list_store_insert_with_values (store, iter, 1, 0, _(Write only), -1); /* 0002 */ - gtk_list_store_insert_with_values (store, iter, 2, 0, _(Read only), -1); /* 0004 */ - gtk_list_store_insert_with_values (store, iter, 3, 0, _(Read Write), -1); /* 0006 */ - /* allocate the shared renderer for the various combo boxes */ renderer_text = gtk_cell_renderer_text_new (); @@ -246,7 +238,7 @@ thunar_permissions_chooser_init (ThunarPermissionsChooser *chooser) gtk_table_attach (GTK_TABLE (chooser-table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); - chooser-access_combos[2] = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); + chooser-access_combos[2] = gtk_combo_box_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (chooser-access_combos[2]), renderer_text, TRUE); gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (chooser-access_combos[2]), renderer_text, text, 0); exo_binding_new (G_OBJECT (chooser), mutable, G_OBJECT (chooser-access_combos[2]), sensitive); @@ -287,7 +279,7 @@ thunar_permissions_chooser_init (ThunarPermissionsChooser *chooser) gtk_table_attach (GTK_TABLE (chooser-table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); - chooser-access_combos[1] = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); + chooser-access_combos[1] = gtk_combo_box_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (chooser-access_combos[1]), renderer_text, TRUE); gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (chooser-access_combos[1]), renderer_text, text, 0); exo_binding_new (G_OBJECT (chooser), mutable,
[Xfce4-commits] thunar:nick/multiple-file-properties Don't error during counting with multiple files.
Updating branch refs/heads/nick/multiple-file-properties to 5c0f6c9dd19e2d4b87b2aedbc007aeea92e01431 (commit) from 0156959702eaf110e64532d44876033fc41fc617 (commit) commit 5c0f6c9dd19e2d4b87b2aedbc007aeea92e01431 Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 17:56:09 2012 +0200 Don't error during counting with multiple files. Handle this differently, so the count job does not error, but if it turns out all content was unreadable the size label will show a permission denied error. thunar/thunar-deep-count-job.c |6 +++--- thunar/thunar-size-label.c | 34 +- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/thunar/thunar-deep-count-job.c b/thunar/thunar-deep-count-job.c index 6613dfe..23d5a94 100644 --- a/thunar/thunar-deep-count-job.c +++ b/thunar/thunar-deep-count-job.c @@ -220,7 +220,8 @@ thunar_deep_count_job_process (ExoJob*job, /* directory was unreadable */ count_job-unreadable_directory_count += 1; - if (toplevel_file) + if (toplevel_file + g_list_length (count_job-files) 2) { /* we only bail out if the job file is unreadable */ success = FALSE; @@ -228,8 +229,7 @@ thunar_deep_count_job_process (ExoJob*job, else { /* ignore errors from files other than the job file */ - g_error_free (*error); - *error = NULL; + g_clear_error (error); } } else diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index e1462c8..3f0c12b 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -368,22 +368,30 @@ thunar_size_label_status_update (ThunarDeepCountJob *job, /* determine the total number of items */ n = file_count + directory_count + unreadable_directory_count; - /* update the label */ - size_string = g_format_size (total_size); - text = g_strdup_printf (ngettext (%u item, totalling %s, %u items, totalling %s, n), n, size_string); - g_free (size_string); - - if (unreadable_directory_count 0) + if (G_LIKELY (n unreadable_directory_count)) { - /* TRANSLATORS: this is shows if during the deep count size - * directories were not accessible */ - unreable_text = g_strconcat (text, \n, _((some contents unreadable)), NULL); + /* update the label */ + size_string = g_format_size (total_size); + text = g_strdup_printf (ngettext (%u item, totalling %s, %u items, totalling %s, n), n, size_string); + g_free (size_string); + + if (unreadable_directory_count 0) +{ + /* TRANSLATORS: this is shows if during the deep count size + * directories were not accessible */ + unreable_text = g_strconcat (text, \n, _((some contents unreadable)), NULL); + g_free (text); + text = unreable_text; +} + + gtk_label_set_text (GTK_LABEL (size_label-label), text); g_free (text); - text = unreable_text; } - - gtk_label_set_text (GTK_LABEL (size_label-label), text); - g_free (text); + else +{ + /* nothing was readable, so permission was denied */ + gtk_label_set_text (GTK_LABEL (size_label-label), _(Permission denied)); +} } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-places-plugin:master Updated INSTALL
Updating branch refs/heads/master to 187a18571b4b8c079d27edf106100868d841333d (commit) from 19178ffd167bc0e0139fbf7db54f8acf999b47de (commit) commit 187a18571b4b8c079d27edf106100868d841333d Author: Andrzej ndrwr...@gmail.com Date: Mon Sep 17 02:05:55 2012 +0900 Updated INSTALL INSTALL | 207 +++--- 1 files changed, 170 insertions(+), 37 deletions(-) diff --git a/INSTALL b/INSTALL index d3c5b40..a1e89e1 100644 --- a/INSTALL +++ b/INSTALL @@ -1,19 +1,25 @@ Installation Instructions * -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007 Free Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Inc. -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. Basic Installation == -Briefly, the shell commands `./configure; make; make install' should + 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. +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -42,7 +48,7 @@ may remove or edit it. you want to change it or regenerate `configure' using a newer version of `autoconf'. -The simplest way to compile this package is: + 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. @@ -53,12 +59,22 @@ The simplest way to compile this package is: 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with - the package. + the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is @@ -67,15 +83,22 @@ The simplest way to compile this package is: 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. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. Compilers and Options = -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting
[Xfce4-commits] thunar:nick/multiple-file-properties Fix compiler warnings.
Updating branch refs/heads/nick/multiple-file-properties to 5898f295cab37e4bbda87f9dcf3a36e00d78fb3e (commit) from 5c0f6c9dd19e2d4b87b2aedbc007aeea92e01431 (commit) commit 5898f295cab37e4bbda87f9dcf3a36e00d78fb3e Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 19:57:44 2012 +0200 Fix compiler warnings. thunar/thunar-deep-count-job.c |2 +- thunar/thunar-dialogs.c |2 +- thunar/thunar-permissions-chooser.c |2 +- thunar/thunar-properties-dialog.c |2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/thunar/thunar-deep-count-job.c b/thunar/thunar-deep-count-job.c index 23d5a94..ab858c3 100644 --- a/thunar/thunar-deep-count-job.c +++ b/thunar/thunar-deep-count-job.c @@ -296,7 +296,7 @@ thunar_deep_count_job_execute (ExoJob *job, GError **error) { ThunarDeepCountJob *count_job = THUNAR_DEEP_COUNT_JOB (job); - gbooleansuccess; + gbooleansuccess = TRUE; GError *err = NULL; GList *lp; GFile *gfile; diff --git a/thunar/thunar-dialogs.c b/thunar/thunar-dialogs.c index b6fe037..37e585a 100644 --- a/thunar/thunar-dialogs.c +++ b/thunar/thunar-dialogs.c @@ -76,7 +76,7 @@ thunar_dialogs_show_rename_file (gpointerparent, gchar *title; gint response; - _thunar_return_val_if_fail (window == NULL || GDK_IS_SCREEN (parent) || GTK_IS_WINDOW (parent), FALSE); + _thunar_return_val_if_fail (parent == NULL || GDK_IS_SCREEN (parent) || GTK_IS_WINDOW (parent), FALSE); _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE); /* parse the parent window and screen */ diff --git a/thunar/thunar-permissions-chooser.c b/thunar/thunar-permissions-chooser.c index 552b5c2..260a452 100644 --- a/thunar/thunar-permissions-chooser.c +++ b/thunar/thunar-permissions-chooser.c @@ -836,7 +836,7 @@ thunar_permissions_chooser_file_changed (ThunarPermissionsChooser *chooser) GtkTreeIteriter; const gchar *user_name; const gchar *real_name; - GList *groups; + GList *groups = NULL; GList *lp; gchar buffer[1024]; guint n; diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index ff13857..fada201 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -1096,7 +1096,7 @@ thunar_properties_dialog_update_multiple (ThunarPropertiesDialog *dialog) GString *names_string; gboolean first_file = TRUE; GList *lp; - const gchar *content_type; + const gchar *content_type = NULL; const gchar *tmp; gchar *str; GVolume *volume = NULL; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:nick/multiple-file-properties Set full filenames list tooltip in the Names label.
Updating branch refs/heads/nick/multiple-file-properties to 172a012bf12de7f4680303b6cc5572d3ae86e377 (commit) from 5898f295cab37e4bbda87f9dcf3a36e00d78fb3e (commit) commit 172a012bf12de7f4680303b6cc5572d3ae86e377 Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 20:11:12 2012 +0200 Set full filenames list tooltip in the Names label. thunar/thunar-properties-dialog.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index fada201..d4a6e1b 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -1195,6 +1195,7 @@ thunar_properties_dialog_update_multiple (ThunarPropertiesDialog *dialog) /* set the labels string */ gtk_label_set_text (GTK_LABEL (dialog-names_label), names_string-str); + gtk_widget_set_tooltip_text (dialog-names_label, names_string-str); g_string_free (names_string, TRUE); /* hide the permissions chooser for trashed files */ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Fill in some content for the multiple files mode.
Updating branch refs/heads/master to 5e9173bd223fba277484280f124c49f7e7fdee2a (commit) from 76172381b4d5d6414736a1d0bddf867a8aa48502 (commit) commit 5e9173bd223fba277484280f124c49f7e7fdee2a Author: Nick Schermer n...@xfce.org Date: Mon Sep 10 21:47:13 2012 +0200 Fill in some content for the multiple files mode. thunar/thunar-properties-dialog.c | 125 + 1 files changed, 113 insertions(+), 12 deletions(-) diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index c04ed92..6282251 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -56,6 +56,8 @@ #include thunar/thunar-size-label.h #include thunar/thunar-thumbnailer.h +#define FIGURE_DASH_STRING \xE2\x80\x92 + /* Property identifiers */ @@ -125,6 +127,8 @@ struct _ThunarPropertiesDialog GtkWidget *icon_button; GtkWidget *icon_image; GtkWidget *name_entry; + GtkWidget *names_label; + GtkWidget *single_box; GtkWidget *kind_ebox; GtkWidget *kind_label; GtkWidget *openwith_chooser; @@ -209,6 +213,7 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) GtkWidget *box; GtkWidget *spacer; gint row = 0; + GtkWidget *image; /* acquire a reference on the preferences and monitor the misc-date-style setting */ dialog-preferences = thunar_preferences_get (); @@ -243,32 +248,59 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) /* - First box (icon, name) + First box (icon, name) for 1 file */ - box = gtk_hbox_new (FALSE, 6); - gtk_table_attach (GTK_TABLE (table), box, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 3); - gtk_widget_show (box); + dialog-single_box = gtk_hbox_new (FALSE, 6); + gtk_table_attach (GTK_TABLE (table), dialog-single_box, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 3); dialog-icon_button = gtk_button_new (); g_signal_connect (G_OBJECT (dialog-icon_button), clicked, G_CALLBACK (thunar_properties_dialog_icon_button_clicked), dialog); - gtk_box_pack_start (GTK_BOX (box), dialog-icon_button, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (dialog-single_box), dialog-icon_button, FALSE, TRUE, 0); gtk_widget_show (dialog-icon_button); dialog-icon_image = thunar_image_new (); - gtk_box_pack_start (GTK_BOX (box), dialog-icon_image, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (dialog-single_box), dialog-icon_image, FALSE, TRUE, 0); gtk_widget_show (dialog-icon_image); label = gtk_label_new (_(Name:)); gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); - gtk_box_pack_end (GTK_BOX (box), label, TRUE, TRUE, 0); + gtk_box_pack_end (GTK_BOX (dialog-single_box), label, TRUE, TRUE, 0); gtk_widget_show (label); dialog-name_entry = g_object_new (GTK_TYPE_ENTRY, editable, FALSE, NULL); g_signal_connect (G_OBJECT (dialog-name_entry), activate, G_CALLBACK (thunar_properties_dialog_name_activate), dialog); g_signal_connect (G_OBJECT (dialog-name_entry), focus-out-event, G_CALLBACK (thunar_properties_dialog_name_focus_out_event), dialog); gtk_table_attach (GTK_TABLE (table), dialog-name_entry, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 3); - gtk_widget_show (dialog-name_entry); + exo_binding_new (G_OBJECT (dialog-single_box), visible, G_OBJECT (dialog-name_entry), visible); + + ++row; + + + /* + First box (icon, name) for multiple files + */ + box = gtk_hbox_new (FALSE, 6); + gtk_table_attach (GTK_TABLE (table), box, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 3); + exo_binding_new_with_negation (G_OBJECT (dialog-single_box), visible, G_OBJECT (box), visible); + + image = gtk_image_new_from_icon_name (text-x-generic, GTK_ICON_SIZE_DIALOG); + gtk_box_pack_start (GTK_BOX (box), image, FALSE, TRUE, 0); + gtk_widget_show (image); + + label = gtk_label_new (_(Names:)); + gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); + gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); + gtk_box_pack_end (GTK_BOX (box), label, TRUE, TRUE, 0); + gtk_widget_show (label); + + dialog-names_label = gtk_label_new (); + gtk_misc_set_alignment (GTK_MISC (dialog-names_label), 0.0f, 0.5f); + gtk_table_attach (GTK_TABLE (table), dialog-names_label, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 3); + gtk_label_set_ellipsize (GTK_LABEL (dialog-names_label), PANGO_ELLIPSIZE_END); + gtk_label_set_selectable (GTK_LABEL (dialog-names_label), TRUE); + exo_binding_new (G_OBJECT (box), visible, G_OBJECT (dialog-names_label), visible); + ++row; @@ -1002,11 +1034,7 @@ thunar_properties_dialog_update_single (ThunarPropertiesDialog *dialog) if (thunar_file_is_directory (file) thunar_file_get_free_space (file, size)) { -#if
[Xfce4-commits] thunar:master Show more information if multiple files are selected.
Updating branch refs/heads/master to 068a9c5f921bab6b61abc07f61e0d6d5d0087139 (commit) from 5e9173bd223fba277484280f124c49f7e7fdee2a (commit) commit 068a9c5f921bab6b61abc07f61e0d6d5d0087139 Author: Nick Schermer n...@xfce.org Date: Tue Sep 11 19:59:08 2012 +0200 Show more information if multiple files are selected. thunar/thunar-properties-dialog.c | 150 + 1 files changed, 136 insertions(+), 14 deletions(-) diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index 6282251..67dc951 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -56,8 +56,6 @@ #include thunar/thunar-size-label.h #include thunar/thunar-thumbnailer.h -#define FIGURE_DASH_STRING \xE2\x80\x92 - /* Property identifiers */ @@ -133,6 +131,7 @@ struct _ThunarPropertiesDialog GtkWidget *kind_label; GtkWidget *openwith_chooser; GtkWidget *link_label; + GtkWidget *location_label; GtkWidget *origin_label; GtkWidget *deleted_label; GtkWidget *modified_label; @@ -383,6 +382,20 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) ++row; + label = gtk_label_new (_(Location:)); + gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); + gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 3); + gtk_widget_show (label); + + dialog-location_label = g_object_new (GTK_TYPE_LABEL, ellipsize, PANGO_ELLIPSIZE_START, xalign, 0.0f, NULL); + gtk_label_set_selectable (GTK_LABEL (dialog-location_label), TRUE); + exo_binding_new (G_OBJECT (dialog-location_label), visible, G_OBJECT (label), visible); + gtk_table_attach (GTK_TABLE (table), dialog-location_label, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 3); + gtk_widget_show (dialog-location_label); + + ++row; + spacer = g_object_new (GTK_TYPE_ALIGNMENT, height-request, 12, NULL); gtk_table_attach (GTK_TABLE (table), spacer, 0, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 3); @@ -439,7 +452,7 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) spacer = g_object_new (GTK_TYPE_ALIGNMENT, height-request, 12, NULL); gtk_table_attach (GTK_TABLE (table), spacer, 0, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 3); - gtk_widget_show (spacer); + exo_binding_new (G_OBJECT (dialog-accessed_label), visible, G_OBJECT (spacer), visible); ++row; @@ -864,6 +877,7 @@ thunar_properties_dialog_update_single (ThunarPropertiesDialog *dialog) gchar *str; gchar *volume_name; ThunarFile*file; + ThunarFile*parent_file; _thunar_return_if_fail (THUNAR_IS_PROPERTIES_DIALOG (dialog)); _thunar_return_if_fail (g_list_length (dialog-files) == 1); @@ -875,13 +889,6 @@ thunar_properties_dialog_update_single (ThunarPropertiesDialog *dialog) /* hide the permissions chooser for trashed files */ gtk_widget_set_visible (dialog-permissions_chooser, !thunar_file_is_trashed (file)); - /* cancel any pending thumbnail requests */ - if (dialog-thumbnail_request 0) -{ - thunar_thumbnailer_dequeue (dialog-thumbnailer, dialog-thumbnail_request); - dialog-thumbnail_request = 0; -} - /* queue a new thumbnail request */ thunar_thumbnailer_queue_file (dialog-thumbnailer, file, dialog-thumbnail_request); @@ -991,6 +998,21 @@ thunar_properties_dialog_update_single (ThunarPropertiesDialog *dialog) gtk_widget_hide (dialog-origin_label); } + /* update the file or folder location (parent) */ + parent_file = thunar_file_get_parent (file, NULL); + if (G_UNLIKELY (parent_file != NULL)) +{ + display_name = g_file_get_parse_name (thunar_file_get_file (parent_file)); + gtk_label_set_text (GTK_LABEL (dialog-location_label), display_name); + gtk_widget_show (dialog-location_label); + g_object_unref (G_OBJECT (parent_file)); + g_free (display_name); +} + else +{ + gtk_widget_hide (dialog-location_label); +} + /* update the deleted time */ date = thunar_file_get_deletion_date (file, date_style); if (G_LIKELY (date != NULL)) @@ -1074,16 +1096,34 @@ thunar_properties_dialog_update_multiple (ThunarPropertiesDialog *dialog) { ThunarFile *file; GString *names_string; - const gchar *display_name; gboolean first_file = TRUE; GList *lp; const gchar *content_type; const gchar *tmp; gchar *str; + GVolume *volume = NULL; + GVolume *tmp_volume; + GIcon *gicon; + gchar *volume_name; + gchar *display_name; + ThunarFile *parent_file = NULL; + ThunarFile *tmp_parent; _thunar_return_if_fail (THUNAR_IS_PROPERTIES_DIALOG (dialog)); _thunar_return_if_fail (g_list_length
[Xfce4-commits] thunar:master Support multiple files in the size label.
Updating branch refs/heads/master to 2b7e3f4a2d9d2d5526b0eb6edcfd5c909e9cd4ba (commit) from 068a9c5f921bab6b61abc07f61e0d6d5d0087139 (commit) commit 2b7e3f4a2d9d2d5526b0eb6edcfd5c909e9cd4ba Author: Nick Schermer n...@xfce.org Date: Tue Sep 11 21:35:34 2012 +0200 Support multiple files in the size label. thunar/thunar-size-label.c | 323 +--- thunar/thunar-size-label.h |1 - 2 files changed, 185 insertions(+), 139 deletions(-) diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index 3e63625..53394b9 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -46,6 +46,10 @@ enum +typedef struct _ThunarSizeLabelFile ThunarSizeLabelFile; + + + static void thunar_size_label_finalize (GObject *object); static void thunar_size_label_get_property (GObject *object, guint prop_id, @@ -58,19 +62,19 @@ static void thunar_size_label_set_property (GObject *o static gboolean thunar_size_label_button_press_event(GtkWidget *ebox, GdkEventButton *event, ThunarSizeLabel *size_label); -static void thunar_size_label_file_changed (ThunarFile *file, - ThunarSizeLabel *size_label); +static void thunar_size_label_file_changed (ThunarFile *changed_file, + ThunarSizeLabelFile *file); static void thunar_size_label_error (ExoJob *job, const GError *error, - ThunarSizeLabel *size_label); + ThunarSizeLabelFile *file); static void thunar_size_label_finished (ExoJob *job, - ThunarSizeLabel *size_label); + ThunarSizeLabelFile *file); static void thunar_size_label_status_update (ThunarDeepCountJob *job, guint64 total_size, guint file_count, guint directory_count, guint unreadable_directory_count, - ThunarSizeLabel *size_label); + ThunarSizeLabelFile *file); static gboolean thunar_size_label_animate_timer (gpointer user_data); static void thunar_size_label_animate_timer_destroy (gpointer user_data); @@ -85,8 +89,6 @@ struct _ThunarSizeLabel { GtkHBox __parent__; - ThunarDeepCountJob *job; - GList *files; GtkWidget *label; @@ -96,6 +98,20 @@ struct _ThunarSizeLabel guint animate_timer_id; }; +struct _ThunarSizeLabelFile +{ + ThunarSizeLabel*size_label; + + ThunarFile *file; + ThunarDeepCountJob *job; + + /* results of the deep-count job */ + guint64 total_size; + guint file_count; + guint directory_count; + guint unreadable_directory_count; +}; + G_DEFINE_TYPE (ThunarSizeLabel, thunar_size_label, GTK_TYPE_HBOX) @@ -122,7 +138,7 @@ thunar_size_label_class_init (ThunarSizeLabelClass *klass) PROP_FILES, g_param_spec_boxed (files, files, files, THUNARX_TYPE_FILE_INFO_LIST, - EXO_PARAM_READWRITE)); + EXO_PARAM_WRITABLE)); } @@ -143,16 +159,14 @@ thunar_size_label_init (ThunarSizeLabel *size_label) g_signal_connect (G_OBJECT (ebox), button-press-event, G_CALLBACK (thunar_size_label_button_press_event), size_label); gtk_widget_set_tooltip_text (ebox, _(Click here to stop calculating the total size of the folder.)); gtk_box_pack_start (GTK_BOX (size_label), ebox, FALSE, FALSE, 0); - gtk_widget_show (ebox); /* add the throbber widget */ size_label-throbber = thunar_throbber_new (); exo_binding_new (G_OBJECT (size_label-throbber), visible, G_OBJECT (ebox), visible); gtk_container_add (GTK_CONTAINER (ebox),
[Xfce4-commits] thunar:master Update some copyrights.
Updating branch refs/heads/master to c15432bc00dd61ff8aeb10054694a78c9619 (commit) from 2b7e3f4a2d9d2d5526b0eb6edcfd5c909e9cd4ba (commit) commit c15432bc00dd61ff8aeb10054694a78c9619 Author: Nick Schermer n...@xfce.org Date: Tue Sep 11 21:45:15 2012 +0200 Update some copyrights. thunar/thunar-properties-dialog.c |3 ++- thunar/thunar-size-label.c|1 + 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index 67dc951..bad6afc 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -2,6 +2,7 @@ /*- * Copyright (c) 2005-2007 Benedikt Meurer be...@xfce.org * Copyright (c) 2009-2011 Jannis Pohlmann jan...@xfce.org + * Copyright (c) 2012 Nick Schermer n...@xfce.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -524,7 +525,7 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) */ label = gtk_label_new (_(Emblems)); chooser = thunar_emblem_chooser_new (); - /*TODOexo_binding_new (G_OBJECT (dialog), file, G_OBJECT (chooser), file);*/ + /*TODOexo_binding_new (G_OBJECT (dialog), files, G_OBJECT (chooser), files);*/ gtk_notebook_append_page (GTK_NOTEBOOK (dialog-notebook), chooser, label); gtk_widget_show (chooser); gtk_widget_show (label); diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index 53394b9..27b0396 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -2,6 +2,7 @@ /*- * Copyright (c) 2006 Benedikt Meurer be...@xfce.org * Copyright (c) 2009 Jannis Pohlmann jan...@xfce.org + * Copyright (c) 2012 Nick Schermer n...@xfce.org * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Make chooser button work again if a single file is selected.
Updating branch refs/heads/master to e0acf17367457f73676e78b4df90484a69711a7b (commit) from c62c230397c3e1afe3772f17e97e8bf7fa4bc468 (commit) commit e0acf17367457f73676e78b4df90484a69711a7b Author: Nick Schermer n...@xfce.org Date: Thu Sep 13 18:22:58 2012 +0200 Make chooser button work again if a single file is selected. thunar/thunar-properties-dialog.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index e6adc85..907055e 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -344,7 +344,6 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) gtk_widget_show (label); dialog-openwith_chooser = thunar_chooser_button_new (); - /*TODO exo_binding_new (G_OBJECT (dialog), file, G_OBJECT (dialog-openwith_chooser), file);*/ exo_binding_new (G_OBJECT (dialog-openwith_chooser), visible, G_OBJECT (label), visible); gtk_table_attach (GTK_TABLE (table), dialog-openwith_chooser, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 3); gtk_widget_show (dialog-openwith_chooser); @@ -879,6 +878,7 @@ thunar_properties_dialog_update_single (ThunarPropertiesDialog *dialog) gchar *volume_name; ThunarFile*file; ThunarFile*parent_file; + gboolean show_chooser; _thunar_return_if_fail (THUNAR_IS_PROPERTIES_DIALOG (dialog)); _thunar_return_if_fail (g_list_length (dialog-files) == 1); @@ -967,9 +967,10 @@ thunar_properties_dialog_update_single (ThunarPropertiesDialog *dialog) } /* update the application chooser (shown only for non-executable regular files!) */ - g_object_set (G_OBJECT (dialog-openwith_chooser), -visible, (thunar_file_is_regular (file) !thunar_file_is_executable (file)), -NULL); + show_chooser = thunar_file_is_regular (file) !thunar_file_is_executable (file); + gtk_widget_set_visible (dialog-openwith_chooser, show_chooser); + if (show_chooser) +thunar_chooser_button_set_file (THUNAR_CHOOSER_BUTTON (dialog-openwith_chooser), file); /* update the link target */ path = thunar_file_is_symlink (file) ? thunar_file_get_symlink_target (file) : NULL; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Make the emblems work with multiple files.
Updating branch refs/heads/master to c62c230397c3e1afe3772f17e97e8bf7fa4bc468 (commit) from c15432bc00dd61ff8aeb10054694a78c9619 (commit) commit c62c230397c3e1afe3772f17e97e8bf7fa4bc468 Author: Nick Schermer n...@xfce.org Date: Wed Sep 12 19:31:15 2012 +0200 Make the emblems work with multiple files. thunar/thunar-emblem-chooser.c| 184 - thunar/thunar-emblem-chooser.h| 10 +- thunar/thunar-properties-dialog.c |2 +- 3 files changed, 125 insertions(+), 71 deletions(-) diff --git a/thunar/thunar-emblem-chooser.c b/thunar/thunar-emblem-chooser.c index 186a6d0..8220fdd 100644 --- a/thunar/thunar-emblem-chooser.c +++ b/thunar/thunar-emblem-chooser.c @@ -38,7 +38,7 @@ enum { PROP_0, - PROP_FILE, + PROP_FILES, }; @@ -57,8 +57,7 @@ static void thunar_emblem_chooser_realize (GtkWidget static void thunar_emblem_chooser_unrealize (GtkWidget *widget); static void thunar_emblem_chooser_button_toggled (GtkToggleButton *button, ThunarEmblemChooser *chooser); -static void thunar_emblem_chooser_file_changed(ThunarFile *file, - ThunarEmblemChooser *chooser); +static void thunar_emblem_chooser_file_changed(ThunarEmblemChooser *chooser); static void thunar_emblem_chooser_theme_changed (GtkIconTheme *icon_theme, ThunarEmblemChooser *chooser); static void thunar_emblem_chooser_create_buttons (ThunarEmblemChooser *chooser); @@ -78,7 +77,7 @@ struct _ThunarEmblemChooser GtkIconTheme *icon_theme; GtkSizeGroup *size_group; - ThunarFile *file; + GList*files; GtkWidget*table; }; @@ -110,10 +109,10 @@ thunar_emblem_chooser_class_init (ThunarEmblemChooserClass *klass) * The file for which emblems should be choosen. **/ g_object_class_install_property (gobject_class, - PROP_FILE, - g_param_spec_object (file, file, file, -THUNAR_TYPE_FILE, -EXO_PARAM_READWRITE)); + PROP_FILES, + g_param_spec_boxed (files, files, files, + THUNARX_TYPE_FILE_INFO_LIST, + EXO_PARAM_READWRITE)); } @@ -152,7 +151,7 @@ thunar_emblem_chooser_dispose (GObject *object) ThunarEmblemChooser *chooser = THUNAR_EMBLEM_CHOOSER (object); /* disconnect from the file */ - thunar_emblem_chooser_set_file (chooser, NULL); + thunar_emblem_chooser_set_files (chooser, NULL); (*G_OBJECT_CLASS (thunar_emblem_chooser_parent_class)-dispose) (object); } @@ -182,8 +181,8 @@ thunar_emblem_chooser_get_property (GObject*object, switch (prop_id) { -case PROP_FILE: - g_value_set_object (value, thunar_emblem_chooser_get_file (chooser)); +case PROP_FILES: + g_value_set_boxed (value, thunar_emblem_chooser_get_files (chooser)); break; default: @@ -204,8 +203,8 @@ thunar_emblem_chooser_set_property (GObject *object, switch (prop_id) { -case PROP_FILE: - thunar_emblem_chooser_set_file (chooser, g_value_get_object (value)); +case PROP_FILES: + thunar_emblem_chooser_set_files (chooser, g_value_get_boxed (value)); break; default: @@ -261,70 +260,121 @@ thunar_emblem_chooser_button_toggled (GtkToggleButton *button, ThunarEmblemChooser *chooser) { const gchar *emblem_name; - GList *emblem_names = NULL; - GList *children; - GList *lp; + GList *emblem_names; + GList *lp; + GList *delete_link; + gboolean is_modified; _thunar_return_if_fail (GTK_IS_TOGGLE_BUTTON (button)); _thunar_return_if_fail (THUNAR_IS_EMBLEM_CHOOSER (chooser)); /* we just ignore toggle events if no file is set */ - if (G_LIKELY (chooser-file == NULL)) + if (G_LIKELY (chooser-files == NULL)) return; - /* determine the list of selected emblems */ - children = gtk_container_get_children (GTK_CONTAINER (chooser-table)); - for (lp = children; lp != NULL; lp = lp-next) -if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (lp-data))) + /* get the name of the toggled button */ + emblem_name = g_object_get_data (G_OBJECT (button), I_(thunar-emblem)); + if (G_UNLIKELY (emblem_name == NULL)) +return; + + /* once clicked, it is active or inactive */ + gtk_toggle_button_set_inconsistent (button, FALSE); + + for (lp = chooser-files; lp != NULL; lp = lp-next) +{ + emblem_names =
[Xfce4-commits] thunar:master Make size label files property read write.
Updating branch refs/heads/master to f60c5c3443d87220b3be28157683e39d7ae32564 (commit) from 785499544063df50003f0ea6b4f001e00fc96d44 (commit) commit f60c5c3443d87220b3be28157683e39d7ae32564 Author: Nick Schermer n...@xfce.org Date: Thu Sep 13 21:55:46 2012 +0200 Make size label files property read write. thunar/thunar-size-label.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index 1e27e05..06f06ed 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -122,7 +122,7 @@ thunar_size_label_class_init (ThunarSizeLabelClass *klass) PROP_FILES, g_param_spec_boxed (files, files, files, THUNARX_TYPE_FILE_INFO_LIST, - EXO_PARAM_WRITABLE)); + EXO_PARAM_READWRITE)); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Move some code around in size label.
Updating branch refs/heads/master to 3867630a728710beda20142b2072c32d61280adf (commit) from f60c5c3443d87220b3be28157683e39d7ae32564 (commit) commit 3867630a728710beda20142b2072c32d61280adf Author: Nick Schermer n...@xfce.org Date: Thu Sep 13 22:01:49 2012 +0200 Move some code around in size label. thunar/thunar-size-label.c | 20 +++- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index 06f06ed..68d95b3 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -167,6 +167,14 @@ thunar_size_label_finalize (GObject *object) { ThunarSizeLabel *size_label = THUNAR_SIZE_LABEL (object); + /* cancel the pending job (if any) */ + if (G_UNLIKELY (size_label-job != NULL)) +{ + g_signal_handlers_disconnect_matched (G_OBJECT (size_label-job), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, size_label); + exo_job_cancel (EXO_JOB (size_label-job)); + g_object_unref (size_label-job); +} + /* reset the file property */ thunar_size_label_set_files (size_label, NULL); @@ -300,6 +308,9 @@ thunar_size_label_files_changed (ThunarSizeLabel *size_label) g_signal_connect (size_label-job, finished, G_CALLBACK (thunar_size_label_finished), size_label); g_signal_connect (size_label-job, status-update, G_CALLBACK (thunar_size_label_status_update), size_label); + /* tell the user that we started calculation */ + gtk_label_set_text (GTK_LABEL (size_label-label), _(Calculating...)); + /* launch the job */ exo_job_launch (EXO_JOB (size_label-job)); } @@ -476,15 +487,6 @@ thunar_size_label_set_files (ThunarSizeLabel *size_label, _thunar_return_if_fail (THUNAR_IS_SIZE_LABEL (size_label)); _thunar_return_if_fail (files == NULL || THUNAR_IS_FILE (files-data)); - /* stop a running job */ - if (G_UNLIKELY (size_label-job != NULL)) -{ - g_signal_handlers_disconnect_matched (size_label-job, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, size_label); - exo_job_cancel (EXO_JOB (size_label-job)); - g_object_unref (size_label-job); - size_label-job = NULL; -} - /* disconnect from the previous files */ for (lp = size_label-files; lp != NULL; lp = lp-next) { ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Make parts of the permissions chooser work with multiple files.
Updating branch refs/heads/master to fac3514fb550c404fc275dc59330ff9afc490cb1 (commit) from e0acf17367457f73676e78b4df90484a69711a7b (commit) commit fac3514fb550c404fc275dc59330ff9afc490cb1 Author: Nick Schermer n...@xfce.org Date: Thu Sep 13 20:45:19 2012 +0200 Make parts of the permissions chooser work with multiple files. thunar/thunar-io-jobs.c | 30 ++--- thunar/thunar-io-jobs.h |4 +- thunar/thunar-permissions-chooser.c | 281 ++ thunar/thunar-permissions-chooser.h | 10 +- thunar/thunar-properties-dialog.c | 13 +- 5 files changed, 207 insertions(+), 131 deletions(-) diff --git a/thunar/thunar-io-jobs.c b/thunar/thunar-io-jobs.c index 859bdef..a90ab69 100644 --- a/thunar/thunar-io-jobs.c +++ b/thunar/thunar-io-jobs.c @@ -958,25 +958,20 @@ retry_chown: ThunarJob * -thunar_io_jobs_change_group (GFile*file, +thunar_io_jobs_change_group (GList*files, guint32 gid, gboolean recursive) { - GList file_list; + _thunar_return_val_if_fail (files != NULL, NULL); - _thunar_return_val_if_fail (G_IS_FILE (file), NULL); + /* files are released when the list if destroyed */ + g_list_foreach (files, (GFunc) g_object_ref, NULL); - file_list.data = g_object_ref (file); - file_list.next = NULL; - file_list.prev = NULL; - return thunar_simple_job_launch (_thunar_io_jobs_chown, 4, - THUNAR_TYPE_G_FILE_LIST, file_list, + THUNAR_TYPE_G_FILE_LIST, files, G_TYPE_INT, -1, G_TYPE_INT, (gint) gid, G_TYPE_BOOLEAN, recursive); - - g_object_unref (file_list.data); } @@ -1112,30 +1107,25 @@ retry_chown: ThunarJob * -thunar_io_jobs_change_mode (GFile *file, +thunar_io_jobs_change_mode (GList *files, ThunarFileMode dir_mask, ThunarFileMode dir_mode, ThunarFileMode file_mask, ThunarFileMode file_mode, gboolean recursive) { - GList file_list; + _thunar_return_val_if_fail (files != NULL, NULL); - _thunar_return_val_if_fail (G_IS_FILE (file), NULL); + /* files are released when the list if destroyed */ + g_list_foreach (files, (GFunc) g_object_ref, NULL); - file_list.data = g_object_ref (file); - file_list.next = NULL; - file_list.prev = NULL; - return thunar_simple_job_launch (_thunar_io_jobs_chmod, 6, - THUNAR_TYPE_G_FILE_LIST, file_list, + THUNAR_TYPE_G_FILE_LIST, files, THUNAR_TYPE_FILE_MODE, dir_mask, THUNAR_TYPE_FILE_MODE, dir_mode, THUNAR_TYPE_FILE_MODE, file_mask, THUNAR_TYPE_FILE_MODE, file_mode, G_TYPE_BOOLEAN, recursive); - - g_object_unref (file_list.data); } diff --git a/thunar/thunar-io-jobs.h b/thunar/thunar-io-jobs.h index 5821c44..11d9c0d 100644 --- a/thunar/thunar-io-jobs.h +++ b/thunar/thunar-io-jobs.h @@ -38,10 +38,10 @@ ThunarJob *thunar_io_jobs_link_files (GList *source_file_list, ThunarJob *thunar_io_jobs_trash_files (GList *file_list) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; ThunarJob *thunar_io_jobs_restore_files(GList *source_file_list, GList *target_file_list) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; -ThunarJob *thunar_io_jobs_change_group (GFile *file, +ThunarJob *thunar_io_jobs_change_group (GList *files, guint32gid, gboolean recursive) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; -ThunarJob *thunar_io_jobs_change_mode (GFile *file, +ThunarJob *thunar_io_jobs_change_mode (GList *files, ThunarFileMode dir_mask, ThunarFileMode dir_mode, ThunarFileMode file_mask, diff --git a/thunar/thunar-permissions-chooser.c b/thunar/thunar-permissions-chooser.c index 576010f..692479e 100644 --- a/thunar/thunar-permissions-chooser.c +++ b/thunar/thunar-permissions-chooser.c @@ -58,7 +58,7 @@ enum { PROP_0, - PROP_FILE, + PROP_FILES, PROP_MUTABLE, }; @@ -91,8 +91,7 @@ static void thunar_permissions_chooser_change_mode (ThunarP ThunarFileMode file_mode); static void thunar_permissions_chooser_access_changed
[Xfce4-commits] thunar:master Make the deep count job handle multiple files.
Updating branch refs/heads/master to 785499544063df50003f0ea6b4f001e00fc96d44 (commit) from fac3514fb550c404fc275dc59330ff9afc490cb1 (commit) commit 785499544063df50003f0ea6b4f001e00fc96d44 Author: Nick Schermer n...@xfce.org Date: Thu Sep 13 21:53:16 2012 +0200 Make the deep count job handle multiple files. Not the size label... thunar/thunar-deep-count-job.c | 85 ++- thunar/thunar-deep-count-job.h |2 +- thunar/thunar-size-label.c | 321 +--- thunar/thunar-size-label.h |1 + 4 files changed, 185 insertions(+), 224 deletions(-) diff --git a/thunar/thunar-deep-count-job.c b/thunar/thunar-deep-count-job.c index d2c9dfb..bd7f15c 100644 --- a/thunar/thunar-deep-count-job.c +++ b/thunar/thunar-deep-count-job.c @@ -2,19 +2,19 @@ /*- * Copyright (c) 2009 Jannis Pohlmann jan...@xfce.org. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ @@ -65,7 +65,7 @@ struct _ThunarDeepCountJob { ThunarJob __parent__; - GFile *file; + GList *files; GFileQueryInfoFlags query_flags; /* the time of the last status-update emission */ @@ -95,7 +95,7 @@ thunar_deep_count_job_class_init (ThunarDeepCountJobClass *klass) GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (klass); - gobject_class-finalize = thunar_deep_count_job_finalize; + gobject_class-finalize = thunar_deep_count_job_finalize; job_class = EXO_JOB_CLASS (klass); job_class-execute = thunar_deep_count_job_execute; @@ -108,7 +108,7 @@ thunar_deep_count_job_class_init (ThunarDeepCountJobClass *klass) * @directory_count: the number of directories. * @unreadable_directory_count : the number of unreadable directories. * - * Emitted by the @job to inform listeners about the number of files, + * Emitted by the @job to inform listeners about the number of files, * directories and bytes counted so far. **/ deep_count_signals[STATUS_UPDATE] = @@ -130,7 +130,7 @@ thunar_deep_count_job_class_init (ThunarDeepCountJobClass *klass) static void thunar_deep_count_job_init (ThunarDeepCountJob *job) { - job-file = NULL; + job-files = NULL; job-query_flags = G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS; job-total_size = 0; job-file_count = 0; @@ -146,8 +146,7 @@ thunar_deep_count_job_finalize (GObject *object) { ThunarDeepCountJob *job = THUNAR_DEEP_COUNT_JOB (object); - if (G_LIKELY (job-file != NULL)) -g_object_unref (job-file); + g_list_free_full (job-files, g_object_unref); (*G_OBJECT_CLASS (thunar_deep_count_job_parent_class)-finalize) (object); } @@ -159,7 +158,7 @@ thunar_deep_count_job_status_update (ThunarDeepCountJob *job) { _thunar_return_if_fail (THUNAR_IS_DEEP_COUNT_JOB (job)); - exo_job_emit (EXO_JOB (job), + exo_job_emit (EXO_JOB (job), deep_count_signals[STATUS_UPDATE], 0, job-total_size, @@ -171,9 +170,10 @@ thunar_deep_count_job_status_update (ThunarDeepCountJob *job) static gboolean -thunar_deep_count_job_process (ExoJob *job, - GFile *file, - GError **error) +thunar_deep_count_job_process (ExoJob*job, + GFile *file, + gboolean toplevel_file, + GError **error) { ThunarDeepCountJob *count_job = THUNAR_DEEP_COUNT_JOB (job); GFileEnumerator*enumerator; @@ -192,7 +192,7 @@ thunar_deep_count_job_process (ExoJob *job, return FALSE; /* query size and type of the current file */ - info =
[Xfce4-commits] thunar:master Fix critical error when F5 is pressed.
Updating branch refs/heads/master to 6e371848de03b01378dc1245efce8a4e5141ab13 (commit) from 400dc13336243b4eed153dbfeef8e35ad37ca8c1 (commit) commit 6e371848de03b01378dc1245efce8a4e5141ab13 Author: Nick Schermer n...@xfce.org Date: Fri Sep 14 19:01:21 2012 +0200 Fix critical error when F5 is pressed. Because the focussed widget was not visible in the multiple view, and assertion occured when F5 was pressed: 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed. thunar/thunar-properties-dialog.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index d6b8b17..ff13857 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -538,10 +538,6 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) gtk_notebook_append_page (GTK_NOTEBOOK (dialog-notebook), dialog-permissions_chooser, label); gtk_widget_show (dialog-permissions_chooser); gtk_widget_show (label); - - - /* place the initial focus on the name entry widget */ - gtk_widget_grab_focus (dialog-name_entry); } @@ -1275,6 +1271,9 @@ thunar_properties_dialog_update (ThunarPropertiesDialog *dialog) /* update the properties for a dialog showing 1 file */ thunar_properties_dialog_update_single (dialog); + + /* place the initial focus on the name entry widget */ + gtk_widget_grab_focus (dialog-name_entry); } else { ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Directly show the throbber for deep count jobs.
Updating branch refs/heads/master to 400dc13336243b4eed153dbfeef8e35ad37ca8c1 (commit) from 3867630a728710beda20142b2072c32d61280adf (commit) commit 400dc13336243b4eed153dbfeef8e35ad37ca8c1 Author: Nick Schermer n...@xfce.org Date: Thu Sep 13 22:20:32 2012 +0200 Directly show the throbber for deep count jobs. It gives better feedback if the throbber is shown directly when a deep count job is started. For single files it is always hidden. thunar/thunar-deep-count-job.c | 31 ++ thunar/thunar-size-label.c | 65 2 files changed, 23 insertions(+), 73 deletions(-) diff --git a/thunar/thunar-deep-count-job.c b/thunar/thunar-deep-count-job.c index bd7f15c..5a8f7ed 100644 --- a/thunar/thunar-deep-count-job.c +++ b/thunar/thunar-deep-count-job.c @@ -130,13 +130,7 @@ thunar_deep_count_job_class_init (ThunarDeepCountJobClass *klass) static void thunar_deep_count_job_init (ThunarDeepCountJob *job) { - job-files = NULL; job-query_flags = G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS; - job-total_size = 0; - job-file_count = 0; - job-directory_count = 0; - job-unreadable_directory_count = 0; - job-last_time = 0; } @@ -271,11 +265,12 @@ thunar_deep_count_job_process (ExoJob*job, } /* emit status update whenever we've finished a directory, - * but not more than fourth per second */ + * but not more than four times per second */ real_time = thunar_util_get_real_time (); if (real_time = count_job-last_time) { - thunar_deep_count_job_status_update (count_job); + if (count_job-last_time != 0) +thunar_deep_count_job_status_update (count_job); count_job-last_time = real_time + (G_USEC_PER_SEC / 4); } } @@ -299,10 +294,11 @@ static gboolean thunar_deep_count_job_execute (ExoJob *job, GError **error) { - gboolean success; - GError *err = NULL; - GList *lp; - GFile *gfile; + ThunarDeepCountJob *count_job = THUNAR_DEEP_COUNT_JOB (job); + gbooleansuccess; + GError *err = NULL; + GList *lp; + GFile *gfile; _thunar_return_val_if_fail (THUNAR_IS_JOB (job), FALSE); _thunar_return_val_if_fail (error == NULL || *error == NULL, FALSE); @@ -311,8 +307,15 @@ thunar_deep_count_job_execute (ExoJob *job, if (exo_job_set_error_if_cancelled (job, error)) return FALSE; + /* reset counters */ + count_job-total_size = 0; + count_job-file_count = 0; + count_job-directory_count = 0; + count_job-unreadable_directory_count = 0; + count_job-last_time = 0; + /* count files, directories and compute size of the job files */ - for (lp = THUNAR_DEEP_COUNT_JOB (job)-files; lp != NULL; lp = lp-next) + for (lp = count_job-files; lp != NULL; lp = lp-next) { gfile = thunar_file_get_file (THUNAR_FILE (lp-data)); success = thunar_deep_count_job_process (job, gfile, TRUE, err); @@ -340,7 +343,7 @@ thunar_deep_count_job_execute (ExoJob *job, else if (!exo_job_is_cancelled (job)) { /* emit final status update at the very end of the computation */ - thunar_deep_count_job_status_update (THUNAR_DEEP_COUNT_JOB (job)); + thunar_deep_count_job_status_update (count_job); } return success; diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index 68d95b3..e1462c8 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -71,8 +71,6 @@ static void thunar_size_label_status_update (ThunarDeepCountJob *j guint directory_count, guint unreadable_directory_count, ThunarSizeLabel *size_label); -static gboolean thunar_size_label_animate_timer (gpointer user_data); -static void thunar_size_label_animate_timer_destroy (gpointer user_data); @@ -91,9 +89,6 @@ struct _ThunarSizeLabel GtkWidget *label; GtkWidget *throbber; - - /* the throbber animation is started after a timeout */ - guint animate_timer_id; }; @@ -178,10 +173,6 @@ thunar_size_label_finalize (GObject *object) /* reset the file property */ thunar_size_label_set_files (size_label, NULL); - /* be sure to cancel any pending animate timer */ - if (G_UNLIKELY (size_label-animate_timer_id != 0)) -g_source_remove (size_label-animate_timer_id); - (*G_OBJECT_CLASS (thunar_size_label_parent_class)-finalize) (object); } @@ -242,10 +233,6 @@ thunar_size_label_button_press_event (GtkWidget *ebox, /* left button press on the throbber cancels the calculation */ if (G_LIKELY (event-button == 1)) { - /* be sure to cancel the animate timer */ -
[Xfce4-commits] thunar:master Don't error during counting with multiple files.
Updating branch refs/heads/master to e88682f80219f130ae543a170a73d1d2fc1f67b5 (commit) from 1183d1a843d122bc121415f6968a67831b66c16d (commit) commit e88682f80219f130ae543a170a73d1d2fc1f67b5 Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 17:56:09 2012 +0200 Don't error during counting with multiple files. Handle this differently, so the count job does not error, but if it turns out all content was unreadable the size label will show a permission denied error. thunar/thunar-deep-count-job.c |6 +++--- thunar/thunar-size-label.c | 34 +- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/thunar/thunar-deep-count-job.c b/thunar/thunar-deep-count-job.c index 6613dfe..23d5a94 100644 --- a/thunar/thunar-deep-count-job.c +++ b/thunar/thunar-deep-count-job.c @@ -220,7 +220,8 @@ thunar_deep_count_job_process (ExoJob*job, /* directory was unreadable */ count_job-unreadable_directory_count += 1; - if (toplevel_file) + if (toplevel_file + g_list_length (count_job-files) 2) { /* we only bail out if the job file is unreadable */ success = FALSE; @@ -228,8 +229,7 @@ thunar_deep_count_job_process (ExoJob*job, else { /* ignore errors from files other than the job file */ - g_error_free (*error); - *error = NULL; + g_clear_error (error); } } else diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index e1462c8..3f0c12b 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -368,22 +368,30 @@ thunar_size_label_status_update (ThunarDeepCountJob *job, /* determine the total number of items */ n = file_count + directory_count + unreadable_directory_count; - /* update the label */ - size_string = g_format_size (total_size); - text = g_strdup_printf (ngettext (%u item, totalling %s, %u items, totalling %s, n), n, size_string); - g_free (size_string); - - if (unreadable_directory_count 0) + if (G_LIKELY (n unreadable_directory_count)) { - /* TRANSLATORS: this is shows if during the deep count size - * directories were not accessible */ - unreable_text = g_strconcat (text, \n, _((some contents unreadable)), NULL); + /* update the label */ + size_string = g_format_size (total_size); + text = g_strdup_printf (ngettext (%u item, totalling %s, %u items, totalling %s, n), n, size_string); + g_free (size_string); + + if (unreadable_directory_count 0) +{ + /* TRANSLATORS: this is shows if during the deep count size + * directories were not accessible */ + unreable_text = g_strconcat (text, \n, _((some contents unreadable)), NULL); + g_free (text); + text = unreable_text; +} + + gtk_label_set_text (GTK_LABEL (size_label-label), text); g_free (text); - text = unreable_text; } - - gtk_label_set_text (GTK_LABEL (size_label-label), text); - g_free (text); + else +{ + /* nothing was readable, so permission was denied */ + gtk_label_set_text (GTK_LABEL (size_label-label), _(Permission denied)); +} } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Improve handling combinations of file permissions.
Updating branch refs/heads/master to e66e43d47ac05c50b9f31ff7a31931e7f103c9cb (commit) from 6e371848de03b01378dc1245efce8a4e5141ab13 (commit) commit e66e43d47ac05c50b9f31ff7a31931e7f103c9cb Author: Nick Schermer n...@xfce.org Date: Fri Sep 14 21:57:20 2012 +0200 Improve handling combinations of file permissions. thunar/thunar-permissions-chooser.c | 199 ++- 1 files changed, 126 insertions(+), 73 deletions(-) diff --git a/thunar/thunar-permissions-chooser.c b/thunar/thunar-permissions-chooser.c index 692479e..5ebcc93 100644 --- a/thunar/thunar-permissions-chooser.c +++ b/thunar/thunar-permissions-chooser.c @@ -788,7 +788,7 @@ group_compare (gconstpointer group_a, gconstpointer group_b, gpointer group_primary) { - guint32 group_primary_id = thunar_group_get_id (THUNAR_GROUP (group_primary)); + guint32 group_primary_id; guint32 group_a_id = thunar_group_get_id (THUNAR_GROUP (group_a)); guint32 group_b_id = thunar_group_get_id (THUNAR_GROUP (group_b)); @@ -797,10 +797,14 @@ group_compare (gconstpointer group_a, return 0; /* the primary group is always sorted first */ - if (group_a_id == group_primary_id) -return -1; - else if (group_b_id == group_primary_id) -return 1; + if (group_primary != NULL) +{ + group_primary_id = thunar_group_get_id (THUNAR_GROUP (group_primary)); + if (group_a_id == group_primary_id) +return -1; + else if (group_b_id == group_primary_id) +return 1; +} /* system groups ( 100) are always sorted last */ if (group_a_id 100 group_b_id = 100) @@ -820,9 +824,9 @@ thunar_permissions_chooser_file_changed (ThunarPermissionsChooser *chooser) { ThunarFile*file; ThunarUserManager *user_manager; - ThunarFileMode mode; - ThunarGroup *group; - ThunarUser*user; + ThunarFileMode mode = 0; + ThunarGroup *group = NULL; + ThunarUser*user = NULL; GtkListStore *store; GtkTreeIteriter; const gchar *user_name; @@ -831,9 +835,49 @@ thunar_permissions_chooser_file_changed (ThunarPermissionsChooser *chooser) GList *lp; gchar buffer[1024]; guint n; + guint n_files = 0; + + gint modes[3] = { 0, }; + gint file_modes[3]; _thunar_return_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser)); + /* compare multiple files */ + for (lp = chooser-files; lp != NULL; lp = lp-next) +{ + file = THUNAR_FILE (lp-data); + + /* transform the file modes in r/w/r+w for each group */ + mode = thunar_file_get_mode (file); + for (n = 0; n 3; n++) +file_modes[n] = ((mode (n * 3)) 0007) 1; + + if (n_files == 0) +{ + /* get information of the first file */ + user = thunar_file_get_user (file); + group = thunar_file_get_group (file); + + for (n = 0; n 3; n++) +modes[n] = file_modes[n]; +} + else +{ + /* unset the file info if it is different from the other files */ + if (user != NULL user != thunar_file_get_user (file)) +user = NULL; + + if (group != NULL group != thunar_file_get_group (file)) +group = NULL; + + for (n = 0; n 3; n++) +if (file_modes[n] != modes[n]) + modes[n] = -1; +} + + n_files++; +} + file = THUNAR_FILE (chooser-files-data); /* allocate a new store for the group combo box */ @@ -842,69 +886,8 @@ thunar_permissions_chooser_file_changed (ThunarPermissionsChooser *chooser) gtk_combo_box_set_model (GTK_COMBO_BOX (chooser-group_combo), GTK_TREE_MODEL (store)); /* determine the owner of the new file */ - user = thunar_file_get_user (file); if (G_LIKELY (user != NULL)) { - /* determine the group of the new file */ - group = thunar_file_get_group (file); - if (G_LIKELY (group != NULL)) -{ - /* check if we have superuser privileges */ - if (G_UNLIKELY (geteuid () == 0)) -{ - /* determine all groups in the system */ - user_manager = thunar_user_manager_get_default (); - groups = thunar_user_manager_get_all_groups (user_manager); - g_object_unref (G_OBJECT (user_manager)); -} - else -{ - /* determine the groups for the user and take a copy */ - groups = g_list_copy (thunar_user_get_groups (user)); - g_list_foreach (groups, (GFunc) g_object_ref, NULL); -} - - /* make sure that the group list includes the file group */ - if (G_UNLIKELY (g_list_find (groups, group) == NULL)) -groups = g_list_prepend (groups, g_object_ref (G_OBJECT (group))); - - /* sort the groups according to group_compare() */ -
[Xfce4-commits] thunar:master Finalize permission handing for multiple files.
Updating branch refs/heads/master to 1183d1a843d122bc121415f6968a67831b66c16d (commit) from e66e43d47ac05c50b9f31ff7a31931e7f103c9cb (commit) commit 1183d1a843d122bc121415f6968a67831b66c16d Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 17:30:39 2012 +0200 Finalize permission handing for multiple files. thunar/thunar-deep-count-job.c |3 +- thunar/thunar-permissions-chooser.c | 67 ++ 2 files changed, 45 insertions(+), 25 deletions(-) diff --git a/thunar/thunar-deep-count-job.c b/thunar/thunar-deep-count-job.c index 5a8f7ed..6613dfe 100644 --- a/thunar/thunar-deep-count-job.c +++ b/thunar/thunar-deep-count-job.c @@ -1,6 +1,7 @@ /* vi:set sw=2 sts=2 ts=2 et ai: */ /*- - * Copyright (c) 2009 Jannis Pohlmann jan...@xfce.org. + * Copyright (c) 2009 Jannis Pohlmann jan...@xfce.org + * Copyright (c) 2012 Nick Schermer n...@xfce.org * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/thunar/thunar-permissions-chooser.c b/thunar/thunar-permissions-chooser.c index 5ebcc93..552b5c2 100644 --- a/thunar/thunar-permissions-chooser.c +++ b/thunar/thunar-permissions-chooser.c @@ -2,6 +2,7 @@ /*- * Copyright (c) 2005-2006 Benedikt Meurer be...@xfce.org * Copyright (c) 2009 Jannis Pohlmann jan...@xfce.org + * Copyright (c) 2012 Nick Schermer n...@xfce.org * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free @@ -84,7 +85,7 @@ static void thunar_permissions_chooser_set_property (GObject static gint thunar_permissions_chooser_ask_recursive (ThunarPermissionsChooser *chooser); static void thunar_permissions_chooser_change_group (ThunarPermissionsChooser *chooser, guint32 gid); -static void thunar_permissions_chooser_change_mode (ThunarPermissionsChooser *chooser, +static gboolean thunar_permissions_chooser_change_mode (ThunarPermissionsChooser *chooser, ThunarFileMode dir_mask, ThunarFileMode dir_mode, ThunarFileMode file_mask, @@ -194,8 +195,6 @@ static void thunar_permissions_chooser_init (ThunarPermissionsChooser *chooser) { GtkCellRenderer *renderer_text; - GtkListStore*store; - GtkTreeIter iter; GtkWidget *separator; GtkWidget *button; GtkWidget *label; @@ -206,13 +205,6 @@ thunar_permissions_chooser_init (ThunarPermissionsChooser *chooser) /* setup the chooser */ gtk_container_set_border_width (GTK_CONTAINER (chooser), 12); - /* allocate the store for the permission combos */ - store = gtk_list_store_new (1, G_TYPE_STRING); - gtk_list_store_insert_with_values (store, iter, 0, 0, _(None), -1); /* */ - gtk_list_store_insert_with_values (store, iter, 1, 0, _(Write only), -1); /* 0002 */ - gtk_list_store_insert_with_values (store, iter, 2, 0, _(Read only), -1); /* 0004 */ - gtk_list_store_insert_with_values (store, iter, 3, 0, _(Read Write), -1); /* 0006 */ - /* allocate the shared renderer for the various combo boxes */ renderer_text = gtk_cell_renderer_text_new (); @@ -246,7 +238,7 @@ thunar_permissions_chooser_init (ThunarPermissionsChooser *chooser) gtk_table_attach (GTK_TABLE (chooser-table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); - chooser-access_combos[2] = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); + chooser-access_combos[2] = gtk_combo_box_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (chooser-access_combos[2]), renderer_text, TRUE); gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (chooser-access_combos[2]), renderer_text, text, 0); exo_binding_new (G_OBJECT (chooser), mutable, G_OBJECT (chooser-access_combos[2]), sensitive); @@ -287,7 +279,7 @@ thunar_permissions_chooser_init (ThunarPermissionsChooser *chooser) gtk_table_attach (GTK_TABLE (chooser-table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); - chooser-access_combos[1] = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); + chooser-access_combos[1] = gtk_combo_box_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (chooser-access_combos[1]), renderer_text, TRUE); gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (chooser-access_combos[1]), renderer_text, text, 0); exo_binding_new (G_OBJECT (chooser), mutable, G_OBJECT
[Xfce4-commits] thunar:master Fix compiler warnings.
Updating branch refs/heads/master to c75b772eaec23caa15e0d1ca9f0ff5b4cf3f6abe (commit) from e88682f80219f130ae543a170a73d1d2fc1f67b5 (commit) commit c75b772eaec23caa15e0d1ca9f0ff5b4cf3f6abe Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 19:57:44 2012 +0200 Fix compiler warnings. thunar/thunar-deep-count-job.c |2 +- thunar/thunar-dialogs.c |2 +- thunar/thunar-permissions-chooser.c |2 +- thunar/thunar-properties-dialog.c |2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/thunar/thunar-deep-count-job.c b/thunar/thunar-deep-count-job.c index 23d5a94..ab858c3 100644 --- a/thunar/thunar-deep-count-job.c +++ b/thunar/thunar-deep-count-job.c @@ -296,7 +296,7 @@ thunar_deep_count_job_execute (ExoJob *job, GError **error) { ThunarDeepCountJob *count_job = THUNAR_DEEP_COUNT_JOB (job); - gbooleansuccess; + gbooleansuccess = TRUE; GError *err = NULL; GList *lp; GFile *gfile; diff --git a/thunar/thunar-dialogs.c b/thunar/thunar-dialogs.c index b6fe037..37e585a 100644 --- a/thunar/thunar-dialogs.c +++ b/thunar/thunar-dialogs.c @@ -76,7 +76,7 @@ thunar_dialogs_show_rename_file (gpointerparent, gchar *title; gint response; - _thunar_return_val_if_fail (window == NULL || GDK_IS_SCREEN (parent) || GTK_IS_WINDOW (parent), FALSE); + _thunar_return_val_if_fail (parent == NULL || GDK_IS_SCREEN (parent) || GTK_IS_WINDOW (parent), FALSE); _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE); /* parse the parent window and screen */ diff --git a/thunar/thunar-permissions-chooser.c b/thunar/thunar-permissions-chooser.c index 552b5c2..260a452 100644 --- a/thunar/thunar-permissions-chooser.c +++ b/thunar/thunar-permissions-chooser.c @@ -836,7 +836,7 @@ thunar_permissions_chooser_file_changed (ThunarPermissionsChooser *chooser) GtkTreeIteriter; const gchar *user_name; const gchar *real_name; - GList *groups; + GList *groups = NULL; GList *lp; gchar buffer[1024]; guint n; diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index ff13857..fada201 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -1096,7 +1096,7 @@ thunar_properties_dialog_update_multiple (ThunarPropertiesDialog *dialog) GString *names_string; gboolean first_file = TRUE; GList *lp; - const gchar *content_type; + const gchar *content_type = NULL; const gchar *tmp; gchar *str; GVolume *volume = NULL; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Set full filenames list tooltip in the Names label.
Updating branch refs/heads/master to a6bed8f13d9e39fbf86b6f4128c06df9028e9d83 (commit) from c75b772eaec23caa15e0d1ca9f0ff5b4cf3f6abe (commit) commit a6bed8f13d9e39fbf86b6f4128c06df9028e9d83 Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 20:11:12 2012 +0200 Set full filenames list tooltip in the Names label. thunar/thunar-properties-dialog.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index fada201..d4a6e1b 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -1195,6 +1195,7 @@ thunar_properties_dialog_update_multiple (ThunarPropertiesDialog *dialog) /* set the labels string */ gtk_label_set_text (GTK_LABEL (dialog-names_label), names_string-str); + gtk_widget_set_tooltip_text (dialog-names_label, names_string-str); g_string_free (names_string, TRUE); /* hide the permissions chooser for trashed files */ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:nick/gseal+clean Deleting branch nick/gseal+clean
Deleting branch refs/heads/nick/gseal+clean ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:nick/gseal+clean Creating branch nick/gseal+clean
Updating branch refs/heads/nick/gseal+clean as new branch to be7de02a3558e4fc8343809831e2f2c53abee5fb (commit) Branches are created implicitly by pushing. This mail only exists to let you know that there was code pushed to refs/heads/nick/gseal+clean for the first time. Mails for the commits that lead to the creation of the branch will follow after this mail. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:nick/gseal+clean Fill in some content for the multiple files mode.
Updating branch refs/heads/nick/gseal+clean to 2738a6f84379964807a05307e8b8f718bdc83e7b (commit) from 8012573c62182c52550970360a526f3835e5366c (commit) commit 2738a6f84379964807a05307e8b8f718bdc83e7b Author: Nick Schermer n...@xfce.org Date: Mon Sep 10 21:47:13 2012 +0200 Fill in some content for the multiple files mode. thunar/thunar-properties-dialog.c | 125 + 1 files changed, 113 insertions(+), 12 deletions(-) diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index c04ed92..6282251 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -56,6 +56,8 @@ #include thunar/thunar-size-label.h #include thunar/thunar-thumbnailer.h +#define FIGURE_DASH_STRING \xE2\x80\x92 + /* Property identifiers */ @@ -125,6 +127,8 @@ struct _ThunarPropertiesDialog GtkWidget *icon_button; GtkWidget *icon_image; GtkWidget *name_entry; + GtkWidget *names_label; + GtkWidget *single_box; GtkWidget *kind_ebox; GtkWidget *kind_label; GtkWidget *openwith_chooser; @@ -209,6 +213,7 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) GtkWidget *box; GtkWidget *spacer; gint row = 0; + GtkWidget *image; /* acquire a reference on the preferences and monitor the misc-date-style setting */ dialog-preferences = thunar_preferences_get (); @@ -243,32 +248,59 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) /* - First box (icon, name) + First box (icon, name) for 1 file */ - box = gtk_hbox_new (FALSE, 6); - gtk_table_attach (GTK_TABLE (table), box, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 3); - gtk_widget_show (box); + dialog-single_box = gtk_hbox_new (FALSE, 6); + gtk_table_attach (GTK_TABLE (table), dialog-single_box, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 3); dialog-icon_button = gtk_button_new (); g_signal_connect (G_OBJECT (dialog-icon_button), clicked, G_CALLBACK (thunar_properties_dialog_icon_button_clicked), dialog); - gtk_box_pack_start (GTK_BOX (box), dialog-icon_button, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (dialog-single_box), dialog-icon_button, FALSE, TRUE, 0); gtk_widget_show (dialog-icon_button); dialog-icon_image = thunar_image_new (); - gtk_box_pack_start (GTK_BOX (box), dialog-icon_image, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (dialog-single_box), dialog-icon_image, FALSE, TRUE, 0); gtk_widget_show (dialog-icon_image); label = gtk_label_new (_(Name:)); gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); - gtk_box_pack_end (GTK_BOX (box), label, TRUE, TRUE, 0); + gtk_box_pack_end (GTK_BOX (dialog-single_box), label, TRUE, TRUE, 0); gtk_widget_show (label); dialog-name_entry = g_object_new (GTK_TYPE_ENTRY, editable, FALSE, NULL); g_signal_connect (G_OBJECT (dialog-name_entry), activate, G_CALLBACK (thunar_properties_dialog_name_activate), dialog); g_signal_connect (G_OBJECT (dialog-name_entry), focus-out-event, G_CALLBACK (thunar_properties_dialog_name_focus_out_event), dialog); gtk_table_attach (GTK_TABLE (table), dialog-name_entry, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 3); - gtk_widget_show (dialog-name_entry); + exo_binding_new (G_OBJECT (dialog-single_box), visible, G_OBJECT (dialog-name_entry), visible); + + ++row; + + + /* + First box (icon, name) for multiple files + */ + box = gtk_hbox_new (FALSE, 6); + gtk_table_attach (GTK_TABLE (table), box, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 3); + exo_binding_new_with_negation (G_OBJECT (dialog-single_box), visible, G_OBJECT (box), visible); + + image = gtk_image_new_from_icon_name (text-x-generic, GTK_ICON_SIZE_DIALOG); + gtk_box_pack_start (GTK_BOX (box), image, FALSE, TRUE, 0); + gtk_widget_show (image); + + label = gtk_label_new (_(Names:)); + gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); + gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); + gtk_box_pack_end (GTK_BOX (box), label, TRUE, TRUE, 0); + gtk_widget_show (label); + + dialog-names_label = gtk_label_new (); + gtk_misc_set_alignment (GTK_MISC (dialog-names_label), 0.0f, 0.5f); + gtk_table_attach (GTK_TABLE (table), dialog-names_label, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 3); + gtk_label_set_ellipsize (GTK_LABEL (dialog-names_label), PANGO_ELLIPSIZE_END); + gtk_label_set_selectable (GTK_LABEL (dialog-names_label), TRUE); + exo_binding_new (G_OBJECT (box), visible, G_OBJECT (dialog-names_label), visible); + ++row; @@ -1002,11 +1034,7 @@ thunar_properties_dialog_update_single (ThunarPropertiesDialog *dialog) if (thunar_file_is_directory (file) thunar_file_get_free_space (file, size))
[Xfce4-commits] thunar:nick/gseal+clean Show more information if multiple files are selected.
Updating branch refs/heads/nick/gseal+clean to 8aef34e0dca18d089f11678ac591c36a799d3d52 (commit) from 2738a6f84379964807a05307e8b8f718bdc83e7b (commit) commit 8aef34e0dca18d089f11678ac591c36a799d3d52 Author: Nick Schermer n...@xfce.org Date: Tue Sep 11 19:59:08 2012 +0200 Show more information if multiple files are selected. thunar/thunar-properties-dialog.c | 150 + 1 files changed, 136 insertions(+), 14 deletions(-) diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index 6282251..67dc951 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -56,8 +56,6 @@ #include thunar/thunar-size-label.h #include thunar/thunar-thumbnailer.h -#define FIGURE_DASH_STRING \xE2\x80\x92 - /* Property identifiers */ @@ -133,6 +131,7 @@ struct _ThunarPropertiesDialog GtkWidget *kind_label; GtkWidget *openwith_chooser; GtkWidget *link_label; + GtkWidget *location_label; GtkWidget *origin_label; GtkWidget *deleted_label; GtkWidget *modified_label; @@ -383,6 +382,20 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) ++row; + label = gtk_label_new (_(Location:)); + gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); + gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 3); + gtk_widget_show (label); + + dialog-location_label = g_object_new (GTK_TYPE_LABEL, ellipsize, PANGO_ELLIPSIZE_START, xalign, 0.0f, NULL); + gtk_label_set_selectable (GTK_LABEL (dialog-location_label), TRUE); + exo_binding_new (G_OBJECT (dialog-location_label), visible, G_OBJECT (label), visible); + gtk_table_attach (GTK_TABLE (table), dialog-location_label, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 3); + gtk_widget_show (dialog-location_label); + + ++row; + spacer = g_object_new (GTK_TYPE_ALIGNMENT, height-request, 12, NULL); gtk_table_attach (GTK_TABLE (table), spacer, 0, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 3); @@ -439,7 +452,7 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) spacer = g_object_new (GTK_TYPE_ALIGNMENT, height-request, 12, NULL); gtk_table_attach (GTK_TABLE (table), spacer, 0, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 3); - gtk_widget_show (spacer); + exo_binding_new (G_OBJECT (dialog-accessed_label), visible, G_OBJECT (spacer), visible); ++row; @@ -864,6 +877,7 @@ thunar_properties_dialog_update_single (ThunarPropertiesDialog *dialog) gchar *str; gchar *volume_name; ThunarFile*file; + ThunarFile*parent_file; _thunar_return_if_fail (THUNAR_IS_PROPERTIES_DIALOG (dialog)); _thunar_return_if_fail (g_list_length (dialog-files) == 1); @@ -875,13 +889,6 @@ thunar_properties_dialog_update_single (ThunarPropertiesDialog *dialog) /* hide the permissions chooser for trashed files */ gtk_widget_set_visible (dialog-permissions_chooser, !thunar_file_is_trashed (file)); - /* cancel any pending thumbnail requests */ - if (dialog-thumbnail_request 0) -{ - thunar_thumbnailer_dequeue (dialog-thumbnailer, dialog-thumbnail_request); - dialog-thumbnail_request = 0; -} - /* queue a new thumbnail request */ thunar_thumbnailer_queue_file (dialog-thumbnailer, file, dialog-thumbnail_request); @@ -991,6 +998,21 @@ thunar_properties_dialog_update_single (ThunarPropertiesDialog *dialog) gtk_widget_hide (dialog-origin_label); } + /* update the file or folder location (parent) */ + parent_file = thunar_file_get_parent (file, NULL); + if (G_UNLIKELY (parent_file != NULL)) +{ + display_name = g_file_get_parse_name (thunar_file_get_file (parent_file)); + gtk_label_set_text (GTK_LABEL (dialog-location_label), display_name); + gtk_widget_show (dialog-location_label); + g_object_unref (G_OBJECT (parent_file)); + g_free (display_name); +} + else +{ + gtk_widget_hide (dialog-location_label); +} + /* update the deleted time */ date = thunar_file_get_deletion_date (file, date_style); if (G_LIKELY (date != NULL)) @@ -1074,16 +1096,34 @@ thunar_properties_dialog_update_multiple (ThunarPropertiesDialog *dialog) { ThunarFile *file; GString *names_string; - const gchar *display_name; gboolean first_file = TRUE; GList *lp; const gchar *content_type; const gchar *tmp; gchar *str; + GVolume *volume = NULL; + GVolume *tmp_volume; + GIcon *gicon; + gchar *volume_name; + gchar *display_name; + ThunarFile *parent_file = NULL; + ThunarFile *tmp_parent; _thunar_return_if_fail (THUNAR_IS_PROPERTIES_DIALOG (dialog)); _thunar_return_if_fail
[Xfce4-commits] thunar:nick/gseal+clean Update some copyrights.
Updating branch refs/heads/nick/gseal+clean to 1179d39652e8c16b6b6fadde580cd5f1d307f52a (commit) from d1ed6e283e1c3a3792936f56e7f3693b36f2ab89 (commit) commit 1179d39652e8c16b6b6fadde580cd5f1d307f52a Author: Nick Schermer n...@xfce.org Date: Tue Sep 11 21:45:15 2012 +0200 Update some copyrights. thunar/thunar-properties-dialog.c |3 ++- thunar/thunar-size-label.c|1 + 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index 67dc951..bad6afc 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -2,6 +2,7 @@ /*- * Copyright (c) 2005-2007 Benedikt Meurer be...@xfce.org * Copyright (c) 2009-2011 Jannis Pohlmann jan...@xfce.org + * Copyright (c) 2012 Nick Schermer n...@xfce.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -524,7 +525,7 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) */ label = gtk_label_new (_(Emblems)); chooser = thunar_emblem_chooser_new (); - /*TODOexo_binding_new (G_OBJECT (dialog), file, G_OBJECT (chooser), file);*/ + /*TODOexo_binding_new (G_OBJECT (dialog), files, G_OBJECT (chooser), files);*/ gtk_notebook_append_page (GTK_NOTEBOOK (dialog-notebook), chooser, label); gtk_widget_show (chooser); gtk_widget_show (label); diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index 53394b9..27b0396 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -2,6 +2,7 @@ /*- * Copyright (c) 2006 Benedikt Meurer be...@xfce.org * Copyright (c) 2009 Jannis Pohlmann jan...@xfce.org + * Copyright (c) 2012 Nick Schermer n...@xfce.org * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:nick/gseal+clean Support multiple files in the size label.
Updating branch refs/heads/nick/gseal+clean to d1ed6e283e1c3a3792936f56e7f3693b36f2ab89 (commit) from 8aef34e0dca18d089f11678ac591c36a799d3d52 (commit) commit d1ed6e283e1c3a3792936f56e7f3693b36f2ab89 Author: Nick Schermer n...@xfce.org Date: Tue Sep 11 21:35:34 2012 +0200 Support multiple files in the size label. thunar/thunar-size-label.c | 323 +--- thunar/thunar-size-label.h |1 - 2 files changed, 185 insertions(+), 139 deletions(-) diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index 3e63625..53394b9 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -46,6 +46,10 @@ enum +typedef struct _ThunarSizeLabelFile ThunarSizeLabelFile; + + + static void thunar_size_label_finalize (GObject *object); static void thunar_size_label_get_property (GObject *object, guint prop_id, @@ -58,19 +62,19 @@ static void thunar_size_label_set_property (GObject *o static gboolean thunar_size_label_button_press_event(GtkWidget *ebox, GdkEventButton *event, ThunarSizeLabel *size_label); -static void thunar_size_label_file_changed (ThunarFile *file, - ThunarSizeLabel *size_label); +static void thunar_size_label_file_changed (ThunarFile *changed_file, + ThunarSizeLabelFile *file); static void thunar_size_label_error (ExoJob *job, const GError *error, - ThunarSizeLabel *size_label); + ThunarSizeLabelFile *file); static void thunar_size_label_finished (ExoJob *job, - ThunarSizeLabel *size_label); + ThunarSizeLabelFile *file); static void thunar_size_label_status_update (ThunarDeepCountJob *job, guint64 total_size, guint file_count, guint directory_count, guint unreadable_directory_count, - ThunarSizeLabel *size_label); + ThunarSizeLabelFile *file); static gboolean thunar_size_label_animate_timer (gpointer user_data); static void thunar_size_label_animate_timer_destroy (gpointer user_data); @@ -85,8 +89,6 @@ struct _ThunarSizeLabel { GtkHBox __parent__; - ThunarDeepCountJob *job; - GList *files; GtkWidget *label; @@ -96,6 +98,20 @@ struct _ThunarSizeLabel guint animate_timer_id; }; +struct _ThunarSizeLabelFile +{ + ThunarSizeLabel*size_label; + + ThunarFile *file; + ThunarDeepCountJob *job; + + /* results of the deep-count job */ + guint64 total_size; + guint file_count; + guint directory_count; + guint unreadable_directory_count; +}; + G_DEFINE_TYPE (ThunarSizeLabel, thunar_size_label, GTK_TYPE_HBOX) @@ -122,7 +138,7 @@ thunar_size_label_class_init (ThunarSizeLabelClass *klass) PROP_FILES, g_param_spec_boxed (files, files, files, THUNARX_TYPE_FILE_INFO_LIST, - EXO_PARAM_READWRITE)); + EXO_PARAM_WRITABLE)); } @@ -143,16 +159,14 @@ thunar_size_label_init (ThunarSizeLabel *size_label) g_signal_connect (G_OBJECT (ebox), button-press-event, G_CALLBACK (thunar_size_label_button_press_event), size_label); gtk_widget_set_tooltip_text (ebox, _(Click here to stop calculating the total size of the folder.)); gtk_box_pack_start (GTK_BOX (size_label), ebox, FALSE, FALSE, 0); - gtk_widget_show (ebox); /* add the throbber widget */ size_label-throbber = thunar_throbber_new (); exo_binding_new (G_OBJECT (size_label-throbber), visible, G_OBJECT (ebox), visible); gtk_container_add (GTK_CONTAINER (ebox),
[Xfce4-commits] thunar:nick/gseal+clean Make chooser button work again if a single file is selected.
Updating branch refs/heads/nick/gseal+clean to 47793236ca9a5f51cc766e958c7a2e246af3aebc (commit) from 4e1707ec792c7ed6be19bba5d83bb777d30d9dd0 (commit) commit 47793236ca9a5f51cc766e958c7a2e246af3aebc Author: Nick Schermer n...@xfce.org Date: Thu Sep 13 18:22:58 2012 +0200 Make chooser button work again if a single file is selected. thunar/thunar-properties-dialog.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index e6adc85..907055e 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -344,7 +344,6 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) gtk_widget_show (label); dialog-openwith_chooser = thunar_chooser_button_new (); - /*TODO exo_binding_new (G_OBJECT (dialog), file, G_OBJECT (dialog-openwith_chooser), file);*/ exo_binding_new (G_OBJECT (dialog-openwith_chooser), visible, G_OBJECT (label), visible); gtk_table_attach (GTK_TABLE (table), dialog-openwith_chooser, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 3); gtk_widget_show (dialog-openwith_chooser); @@ -879,6 +878,7 @@ thunar_properties_dialog_update_single (ThunarPropertiesDialog *dialog) gchar *volume_name; ThunarFile*file; ThunarFile*parent_file; + gboolean show_chooser; _thunar_return_if_fail (THUNAR_IS_PROPERTIES_DIALOG (dialog)); _thunar_return_if_fail (g_list_length (dialog-files) == 1); @@ -967,9 +967,10 @@ thunar_properties_dialog_update_single (ThunarPropertiesDialog *dialog) } /* update the application chooser (shown only for non-executable regular files!) */ - g_object_set (G_OBJECT (dialog-openwith_chooser), -visible, (thunar_file_is_regular (file) !thunar_file_is_executable (file)), -NULL); + show_chooser = thunar_file_is_regular (file) !thunar_file_is_executable (file); + gtk_widget_set_visible (dialog-openwith_chooser, show_chooser); + if (show_chooser) +thunar_chooser_button_set_file (THUNAR_CHOOSER_BUTTON (dialog-openwith_chooser), file); /* update the link target */ path = thunar_file_is_symlink (file) ? thunar_file_get_symlink_target (file) : NULL; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:nick/gseal+clean Make the emblems work with multiple files.
Updating branch refs/heads/nick/gseal+clean to 4e1707ec792c7ed6be19bba5d83bb777d30d9dd0 (commit) from 1179d39652e8c16b6b6fadde580cd5f1d307f52a (commit) commit 4e1707ec792c7ed6be19bba5d83bb777d30d9dd0 Author: Nick Schermer n...@xfce.org Date: Wed Sep 12 19:31:15 2012 +0200 Make the emblems work with multiple files. thunar/thunar-emblem-chooser.c| 184 - thunar/thunar-emblem-chooser.h| 10 +- thunar/thunar-properties-dialog.c |2 +- 3 files changed, 125 insertions(+), 71 deletions(-) diff --git a/thunar/thunar-emblem-chooser.c b/thunar/thunar-emblem-chooser.c index 186a6d0..8220fdd 100644 --- a/thunar/thunar-emblem-chooser.c +++ b/thunar/thunar-emblem-chooser.c @@ -38,7 +38,7 @@ enum { PROP_0, - PROP_FILE, + PROP_FILES, }; @@ -57,8 +57,7 @@ static void thunar_emblem_chooser_realize (GtkWidget static void thunar_emblem_chooser_unrealize (GtkWidget *widget); static void thunar_emblem_chooser_button_toggled (GtkToggleButton *button, ThunarEmblemChooser *chooser); -static void thunar_emblem_chooser_file_changed(ThunarFile *file, - ThunarEmblemChooser *chooser); +static void thunar_emblem_chooser_file_changed(ThunarEmblemChooser *chooser); static void thunar_emblem_chooser_theme_changed (GtkIconTheme *icon_theme, ThunarEmblemChooser *chooser); static void thunar_emblem_chooser_create_buttons (ThunarEmblemChooser *chooser); @@ -78,7 +77,7 @@ struct _ThunarEmblemChooser GtkIconTheme *icon_theme; GtkSizeGroup *size_group; - ThunarFile *file; + GList*files; GtkWidget*table; }; @@ -110,10 +109,10 @@ thunar_emblem_chooser_class_init (ThunarEmblemChooserClass *klass) * The file for which emblems should be choosen. **/ g_object_class_install_property (gobject_class, - PROP_FILE, - g_param_spec_object (file, file, file, -THUNAR_TYPE_FILE, -EXO_PARAM_READWRITE)); + PROP_FILES, + g_param_spec_boxed (files, files, files, + THUNARX_TYPE_FILE_INFO_LIST, + EXO_PARAM_READWRITE)); } @@ -152,7 +151,7 @@ thunar_emblem_chooser_dispose (GObject *object) ThunarEmblemChooser *chooser = THUNAR_EMBLEM_CHOOSER (object); /* disconnect from the file */ - thunar_emblem_chooser_set_file (chooser, NULL); + thunar_emblem_chooser_set_files (chooser, NULL); (*G_OBJECT_CLASS (thunar_emblem_chooser_parent_class)-dispose) (object); } @@ -182,8 +181,8 @@ thunar_emblem_chooser_get_property (GObject*object, switch (prop_id) { -case PROP_FILE: - g_value_set_object (value, thunar_emblem_chooser_get_file (chooser)); +case PROP_FILES: + g_value_set_boxed (value, thunar_emblem_chooser_get_files (chooser)); break; default: @@ -204,8 +203,8 @@ thunar_emblem_chooser_set_property (GObject *object, switch (prop_id) { -case PROP_FILE: - thunar_emblem_chooser_set_file (chooser, g_value_get_object (value)); +case PROP_FILES: + thunar_emblem_chooser_set_files (chooser, g_value_get_boxed (value)); break; default: @@ -261,70 +260,121 @@ thunar_emblem_chooser_button_toggled (GtkToggleButton *button, ThunarEmblemChooser *chooser) { const gchar *emblem_name; - GList *emblem_names = NULL; - GList *children; - GList *lp; + GList *emblem_names; + GList *lp; + GList *delete_link; + gboolean is_modified; _thunar_return_if_fail (GTK_IS_TOGGLE_BUTTON (button)); _thunar_return_if_fail (THUNAR_IS_EMBLEM_CHOOSER (chooser)); /* we just ignore toggle events if no file is set */ - if (G_LIKELY (chooser-file == NULL)) + if (G_LIKELY (chooser-files == NULL)) return; - /* determine the list of selected emblems */ - children = gtk_container_get_children (GTK_CONTAINER (chooser-table)); - for (lp = children; lp != NULL; lp = lp-next) -if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (lp-data))) + /* get the name of the toggled button */ + emblem_name = g_object_get_data (G_OBJECT (button), I_(thunar-emblem)); + if (G_UNLIKELY (emblem_name == NULL)) +return; + + /* once clicked, it is active or inactive */ + gtk_toggle_button_set_inconsistent (button, FALSE); + + for (lp = chooser-files; lp != NULL; lp = lp-next) +{ + emblem_names =
[Xfce4-commits] thunar:nick/gseal+clean Make parts of the permissions chooser work with multiple files.
Updating branch refs/heads/nick/gseal+clean to 752dc5978620814e60a6e0df152cb33c8959f655 (commit) from 47793236ca9a5f51cc766e958c7a2e246af3aebc (commit) commit 752dc5978620814e60a6e0df152cb33c8959f655 Author: Nick Schermer n...@xfce.org Date: Thu Sep 13 20:45:19 2012 +0200 Make parts of the permissions chooser work with multiple files. thunar/thunar-io-jobs.c | 30 ++--- thunar/thunar-io-jobs.h |4 +- thunar/thunar-permissions-chooser.c | 281 ++ thunar/thunar-permissions-chooser.h | 10 +- thunar/thunar-properties-dialog.c | 13 +- 5 files changed, 207 insertions(+), 131 deletions(-) diff --git a/thunar/thunar-io-jobs.c b/thunar/thunar-io-jobs.c index 859bdef..a90ab69 100644 --- a/thunar/thunar-io-jobs.c +++ b/thunar/thunar-io-jobs.c @@ -958,25 +958,20 @@ retry_chown: ThunarJob * -thunar_io_jobs_change_group (GFile*file, +thunar_io_jobs_change_group (GList*files, guint32 gid, gboolean recursive) { - GList file_list; + _thunar_return_val_if_fail (files != NULL, NULL); - _thunar_return_val_if_fail (G_IS_FILE (file), NULL); + /* files are released when the list if destroyed */ + g_list_foreach (files, (GFunc) g_object_ref, NULL); - file_list.data = g_object_ref (file); - file_list.next = NULL; - file_list.prev = NULL; - return thunar_simple_job_launch (_thunar_io_jobs_chown, 4, - THUNAR_TYPE_G_FILE_LIST, file_list, + THUNAR_TYPE_G_FILE_LIST, files, G_TYPE_INT, -1, G_TYPE_INT, (gint) gid, G_TYPE_BOOLEAN, recursive); - - g_object_unref (file_list.data); } @@ -1112,30 +1107,25 @@ retry_chown: ThunarJob * -thunar_io_jobs_change_mode (GFile *file, +thunar_io_jobs_change_mode (GList *files, ThunarFileMode dir_mask, ThunarFileMode dir_mode, ThunarFileMode file_mask, ThunarFileMode file_mode, gboolean recursive) { - GList file_list; + _thunar_return_val_if_fail (files != NULL, NULL); - _thunar_return_val_if_fail (G_IS_FILE (file), NULL); + /* files are released when the list if destroyed */ + g_list_foreach (files, (GFunc) g_object_ref, NULL); - file_list.data = g_object_ref (file); - file_list.next = NULL; - file_list.prev = NULL; - return thunar_simple_job_launch (_thunar_io_jobs_chmod, 6, - THUNAR_TYPE_G_FILE_LIST, file_list, + THUNAR_TYPE_G_FILE_LIST, files, THUNAR_TYPE_FILE_MODE, dir_mask, THUNAR_TYPE_FILE_MODE, dir_mode, THUNAR_TYPE_FILE_MODE, file_mask, THUNAR_TYPE_FILE_MODE, file_mode, G_TYPE_BOOLEAN, recursive); - - g_object_unref (file_list.data); } diff --git a/thunar/thunar-io-jobs.h b/thunar/thunar-io-jobs.h index 5821c44..11d9c0d 100644 --- a/thunar/thunar-io-jobs.h +++ b/thunar/thunar-io-jobs.h @@ -38,10 +38,10 @@ ThunarJob *thunar_io_jobs_link_files (GList *source_file_list, ThunarJob *thunar_io_jobs_trash_files (GList *file_list) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; ThunarJob *thunar_io_jobs_restore_files(GList *source_file_list, GList *target_file_list) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; -ThunarJob *thunar_io_jobs_change_group (GFile *file, +ThunarJob *thunar_io_jobs_change_group (GList *files, guint32gid, gboolean recursive) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; -ThunarJob *thunar_io_jobs_change_mode (GFile *file, +ThunarJob *thunar_io_jobs_change_mode (GList *files, ThunarFileMode dir_mask, ThunarFileMode dir_mode, ThunarFileMode file_mask, diff --git a/thunar/thunar-permissions-chooser.c b/thunar/thunar-permissions-chooser.c index 576010f..692479e 100644 --- a/thunar/thunar-permissions-chooser.c +++ b/thunar/thunar-permissions-chooser.c @@ -58,7 +58,7 @@ enum { PROP_0, - PROP_FILE, + PROP_FILES, PROP_MUTABLE, }; @@ -91,8 +91,7 @@ static void thunar_permissions_chooser_change_mode (ThunarP ThunarFileMode file_mode); static void
[Xfce4-commits] thunar:nick/gseal+clean Make the deep count job handle multiple files.
Updating branch refs/heads/nick/gseal+clean to 79cc5cd893b475488974b309d075884f8f5e5c90 (commit) from 752dc5978620814e60a6e0df152cb33c8959f655 (commit) commit 79cc5cd893b475488974b309d075884f8f5e5c90 Author: Nick Schermer n...@xfce.org Date: Thu Sep 13 21:53:16 2012 +0200 Make the deep count job handle multiple files. Not the size label... thunar/thunar-deep-count-job.c | 85 ++- thunar/thunar-deep-count-job.h |2 +- thunar/thunar-size-label.c | 321 +--- thunar/thunar-size-label.h |1 + 4 files changed, 185 insertions(+), 224 deletions(-) diff --git a/thunar/thunar-deep-count-job.c b/thunar/thunar-deep-count-job.c index d2c9dfb..bd7f15c 100644 --- a/thunar/thunar-deep-count-job.c +++ b/thunar/thunar-deep-count-job.c @@ -2,19 +2,19 @@ /*- * Copyright (c) 2009 Jannis Pohlmann jan...@xfce.org. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ @@ -65,7 +65,7 @@ struct _ThunarDeepCountJob { ThunarJob __parent__; - GFile *file; + GList *files; GFileQueryInfoFlags query_flags; /* the time of the last status-update emission */ @@ -95,7 +95,7 @@ thunar_deep_count_job_class_init (ThunarDeepCountJobClass *klass) GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (klass); - gobject_class-finalize = thunar_deep_count_job_finalize; + gobject_class-finalize = thunar_deep_count_job_finalize; job_class = EXO_JOB_CLASS (klass); job_class-execute = thunar_deep_count_job_execute; @@ -108,7 +108,7 @@ thunar_deep_count_job_class_init (ThunarDeepCountJobClass *klass) * @directory_count: the number of directories. * @unreadable_directory_count : the number of unreadable directories. * - * Emitted by the @job to inform listeners about the number of files, + * Emitted by the @job to inform listeners about the number of files, * directories and bytes counted so far. **/ deep_count_signals[STATUS_UPDATE] = @@ -130,7 +130,7 @@ thunar_deep_count_job_class_init (ThunarDeepCountJobClass *klass) static void thunar_deep_count_job_init (ThunarDeepCountJob *job) { - job-file = NULL; + job-files = NULL; job-query_flags = G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS; job-total_size = 0; job-file_count = 0; @@ -146,8 +146,7 @@ thunar_deep_count_job_finalize (GObject *object) { ThunarDeepCountJob *job = THUNAR_DEEP_COUNT_JOB (object); - if (G_LIKELY (job-file != NULL)) -g_object_unref (job-file); + g_list_free_full (job-files, g_object_unref); (*G_OBJECT_CLASS (thunar_deep_count_job_parent_class)-finalize) (object); } @@ -159,7 +158,7 @@ thunar_deep_count_job_status_update (ThunarDeepCountJob *job) { _thunar_return_if_fail (THUNAR_IS_DEEP_COUNT_JOB (job)); - exo_job_emit (EXO_JOB (job), + exo_job_emit (EXO_JOB (job), deep_count_signals[STATUS_UPDATE], 0, job-total_size, @@ -171,9 +170,10 @@ thunar_deep_count_job_status_update (ThunarDeepCountJob *job) static gboolean -thunar_deep_count_job_process (ExoJob *job, - GFile *file, - GError **error) +thunar_deep_count_job_process (ExoJob*job, + GFile *file, + gboolean toplevel_file, + GError **error) { ThunarDeepCountJob *count_job = THUNAR_DEEP_COUNT_JOB (job); GFileEnumerator*enumerator; @@ -192,7 +192,7 @@ thunar_deep_count_job_process (ExoJob *job, return FALSE; /* query size and type of the current file */ - info =
[Xfce4-commits] thunar:nick/gseal+clean Make size label files property read write.
Updating branch refs/heads/nick/gseal+clean to d7e4aa7788d756de624df841093c42fee0d323f8 (commit) from 79cc5cd893b475488974b309d075884f8f5e5c90 (commit) commit d7e4aa7788d756de624df841093c42fee0d323f8 Author: Nick Schermer n...@xfce.org Date: Thu Sep 13 21:55:46 2012 +0200 Make size label files property read write. thunar/thunar-size-label.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index 1e27e05..06f06ed 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -122,7 +122,7 @@ thunar_size_label_class_init (ThunarSizeLabelClass *klass) PROP_FILES, g_param_spec_boxed (files, files, files, THUNARX_TYPE_FILE_INFO_LIST, - EXO_PARAM_WRITABLE)); + EXO_PARAM_READWRITE)); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:nick/gseal+clean Move some code around in size label.
Updating branch refs/heads/nick/gseal+clean to 7a760461ce74e94820f8193b18092ee9a8643b5e (commit) from d7e4aa7788d756de624df841093c42fee0d323f8 (commit) commit 7a760461ce74e94820f8193b18092ee9a8643b5e Author: Nick Schermer n...@xfce.org Date: Thu Sep 13 22:01:49 2012 +0200 Move some code around in size label. thunar/thunar-size-label.c | 20 +++- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index 06f06ed..68d95b3 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -167,6 +167,14 @@ thunar_size_label_finalize (GObject *object) { ThunarSizeLabel *size_label = THUNAR_SIZE_LABEL (object); + /* cancel the pending job (if any) */ + if (G_UNLIKELY (size_label-job != NULL)) +{ + g_signal_handlers_disconnect_matched (G_OBJECT (size_label-job), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, size_label); + exo_job_cancel (EXO_JOB (size_label-job)); + g_object_unref (size_label-job); +} + /* reset the file property */ thunar_size_label_set_files (size_label, NULL); @@ -300,6 +308,9 @@ thunar_size_label_files_changed (ThunarSizeLabel *size_label) g_signal_connect (size_label-job, finished, G_CALLBACK (thunar_size_label_finished), size_label); g_signal_connect (size_label-job, status-update, G_CALLBACK (thunar_size_label_status_update), size_label); + /* tell the user that we started calculation */ + gtk_label_set_text (GTK_LABEL (size_label-label), _(Calculating...)); + /* launch the job */ exo_job_launch (EXO_JOB (size_label-job)); } @@ -476,15 +487,6 @@ thunar_size_label_set_files (ThunarSizeLabel *size_label, _thunar_return_if_fail (THUNAR_IS_SIZE_LABEL (size_label)); _thunar_return_if_fail (files == NULL || THUNAR_IS_FILE (files-data)); - /* stop a running job */ - if (G_UNLIKELY (size_label-job != NULL)) -{ - g_signal_handlers_disconnect_matched (size_label-job, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, size_label); - exo_job_cancel (EXO_JOB (size_label-job)); - g_object_unref (size_label-job); - size_label-job = NULL; -} - /* disconnect from the previous files */ for (lp = size_label-files; lp != NULL; lp = lp-next) { ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:nick/gseal+clean Fix critical error when F5 is pressed.
Updating branch refs/heads/nick/gseal+clean to 196e59dc2cbc7b4a56b7268ca1b8eecb51ce9032 (commit) from aebdb9a7529817d0e83e0492fd1fbfa6539231bb (commit) commit 196e59dc2cbc7b4a56b7268ca1b8eecb51ce9032 Author: Nick Schermer n...@xfce.org Date: Fri Sep 14 19:01:21 2012 +0200 Fix critical error when F5 is pressed. Because the focussed widget was not visible in the multiple view, and assertion occured when F5 was pressed: 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed. thunar/thunar-properties-dialog.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index d6b8b17..ff13857 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -538,10 +538,6 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) gtk_notebook_append_page (GTK_NOTEBOOK (dialog-notebook), dialog-permissions_chooser, label); gtk_widget_show (dialog-permissions_chooser); gtk_widget_show (label); - - - /* place the initial focus on the name entry widget */ - gtk_widget_grab_focus (dialog-name_entry); } @@ -1275,6 +1271,9 @@ thunar_properties_dialog_update (ThunarPropertiesDialog *dialog) /* update the properties for a dialog showing 1 file */ thunar_properties_dialog_update_single (dialog); + + /* place the initial focus on the name entry widget */ + gtk_widget_grab_focus (dialog-name_entry); } else { ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:nick/gseal+clean Directly show the throbber for deep count jobs.
Updating branch refs/heads/nick/gseal+clean to aebdb9a7529817d0e83e0492fd1fbfa6539231bb (commit) from 7a760461ce74e94820f8193b18092ee9a8643b5e (commit) commit aebdb9a7529817d0e83e0492fd1fbfa6539231bb Author: Nick Schermer n...@xfce.org Date: Thu Sep 13 22:20:32 2012 +0200 Directly show the throbber for deep count jobs. It gives better feedback if the throbber is shown directly when a deep count job is started. For single files it is always hidden. thunar/thunar-deep-count-job.c | 31 ++ thunar/thunar-size-label.c | 65 2 files changed, 23 insertions(+), 73 deletions(-) diff --git a/thunar/thunar-deep-count-job.c b/thunar/thunar-deep-count-job.c index bd7f15c..5a8f7ed 100644 --- a/thunar/thunar-deep-count-job.c +++ b/thunar/thunar-deep-count-job.c @@ -130,13 +130,7 @@ thunar_deep_count_job_class_init (ThunarDeepCountJobClass *klass) static void thunar_deep_count_job_init (ThunarDeepCountJob *job) { - job-files = NULL; job-query_flags = G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS; - job-total_size = 0; - job-file_count = 0; - job-directory_count = 0; - job-unreadable_directory_count = 0; - job-last_time = 0; } @@ -271,11 +265,12 @@ thunar_deep_count_job_process (ExoJob*job, } /* emit status update whenever we've finished a directory, - * but not more than fourth per second */ + * but not more than four times per second */ real_time = thunar_util_get_real_time (); if (real_time = count_job-last_time) { - thunar_deep_count_job_status_update (count_job); + if (count_job-last_time != 0) +thunar_deep_count_job_status_update (count_job); count_job-last_time = real_time + (G_USEC_PER_SEC / 4); } } @@ -299,10 +294,11 @@ static gboolean thunar_deep_count_job_execute (ExoJob *job, GError **error) { - gboolean success; - GError *err = NULL; - GList *lp; - GFile *gfile; + ThunarDeepCountJob *count_job = THUNAR_DEEP_COUNT_JOB (job); + gbooleansuccess; + GError *err = NULL; + GList *lp; + GFile *gfile; _thunar_return_val_if_fail (THUNAR_IS_JOB (job), FALSE); _thunar_return_val_if_fail (error == NULL || *error == NULL, FALSE); @@ -311,8 +307,15 @@ thunar_deep_count_job_execute (ExoJob *job, if (exo_job_set_error_if_cancelled (job, error)) return FALSE; + /* reset counters */ + count_job-total_size = 0; + count_job-file_count = 0; + count_job-directory_count = 0; + count_job-unreadable_directory_count = 0; + count_job-last_time = 0; + /* count files, directories and compute size of the job files */ - for (lp = THUNAR_DEEP_COUNT_JOB (job)-files; lp != NULL; lp = lp-next) + for (lp = count_job-files; lp != NULL; lp = lp-next) { gfile = thunar_file_get_file (THUNAR_FILE (lp-data)); success = thunar_deep_count_job_process (job, gfile, TRUE, err); @@ -340,7 +343,7 @@ thunar_deep_count_job_execute (ExoJob *job, else if (!exo_job_is_cancelled (job)) { /* emit final status update at the very end of the computation */ - thunar_deep_count_job_status_update (THUNAR_DEEP_COUNT_JOB (job)); + thunar_deep_count_job_status_update (count_job); } return success; diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index 68d95b3..e1462c8 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -71,8 +71,6 @@ static void thunar_size_label_status_update (ThunarDeepCountJob *j guint directory_count, guint unreadable_directory_count, ThunarSizeLabel *size_label); -static gboolean thunar_size_label_animate_timer (gpointer user_data); -static void thunar_size_label_animate_timer_destroy (gpointer user_data); @@ -91,9 +89,6 @@ struct _ThunarSizeLabel GtkWidget *label; GtkWidget *throbber; - - /* the throbber animation is started after a timeout */ - guint animate_timer_id; }; @@ -178,10 +173,6 @@ thunar_size_label_finalize (GObject *object) /* reset the file property */ thunar_size_label_set_files (size_label, NULL); - /* be sure to cancel any pending animate timer */ - if (G_UNLIKELY (size_label-animate_timer_id != 0)) -g_source_remove (size_label-animate_timer_id); - (*G_OBJECT_CLASS (thunar_size_label_parent_class)-finalize) (object); } @@ -242,10 +233,6 @@ thunar_size_label_button_press_event (GtkWidget *ebox, /* left button press on the throbber cancels the calculation */ if (G_LIKELY (event-button == 1)) { - /* be sure to cancel the animate
[Xfce4-commits] thunar:nick/gseal+clean Improve handling combinations of file permissions.
Updating branch refs/heads/nick/gseal+clean to 97ee43c303a0dea76f42ea17e933e24d2d1ca8cf (commit) from 196e59dc2cbc7b4a56b7268ca1b8eecb51ce9032 (commit) commit 97ee43c303a0dea76f42ea17e933e24d2d1ca8cf Author: Nick Schermer n...@xfce.org Date: Fri Sep 14 21:57:20 2012 +0200 Improve handling combinations of file permissions. thunar/thunar-permissions-chooser.c | 199 ++- 1 files changed, 126 insertions(+), 73 deletions(-) diff --git a/thunar/thunar-permissions-chooser.c b/thunar/thunar-permissions-chooser.c index 692479e..5ebcc93 100644 --- a/thunar/thunar-permissions-chooser.c +++ b/thunar/thunar-permissions-chooser.c @@ -788,7 +788,7 @@ group_compare (gconstpointer group_a, gconstpointer group_b, gpointer group_primary) { - guint32 group_primary_id = thunar_group_get_id (THUNAR_GROUP (group_primary)); + guint32 group_primary_id; guint32 group_a_id = thunar_group_get_id (THUNAR_GROUP (group_a)); guint32 group_b_id = thunar_group_get_id (THUNAR_GROUP (group_b)); @@ -797,10 +797,14 @@ group_compare (gconstpointer group_a, return 0; /* the primary group is always sorted first */ - if (group_a_id == group_primary_id) -return -1; - else if (group_b_id == group_primary_id) -return 1; + if (group_primary != NULL) +{ + group_primary_id = thunar_group_get_id (THUNAR_GROUP (group_primary)); + if (group_a_id == group_primary_id) +return -1; + else if (group_b_id == group_primary_id) +return 1; +} /* system groups ( 100) are always sorted last */ if (group_a_id 100 group_b_id = 100) @@ -820,9 +824,9 @@ thunar_permissions_chooser_file_changed (ThunarPermissionsChooser *chooser) { ThunarFile*file; ThunarUserManager *user_manager; - ThunarFileMode mode; - ThunarGroup *group; - ThunarUser*user; + ThunarFileMode mode = 0; + ThunarGroup *group = NULL; + ThunarUser*user = NULL; GtkListStore *store; GtkTreeIteriter; const gchar *user_name; @@ -831,9 +835,49 @@ thunar_permissions_chooser_file_changed (ThunarPermissionsChooser *chooser) GList *lp; gchar buffer[1024]; guint n; + guint n_files = 0; + + gint modes[3] = { 0, }; + gint file_modes[3]; _thunar_return_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser)); + /* compare multiple files */ + for (lp = chooser-files; lp != NULL; lp = lp-next) +{ + file = THUNAR_FILE (lp-data); + + /* transform the file modes in r/w/r+w for each group */ + mode = thunar_file_get_mode (file); + for (n = 0; n 3; n++) +file_modes[n] = ((mode (n * 3)) 0007) 1; + + if (n_files == 0) +{ + /* get information of the first file */ + user = thunar_file_get_user (file); + group = thunar_file_get_group (file); + + for (n = 0; n 3; n++) +modes[n] = file_modes[n]; +} + else +{ + /* unset the file info if it is different from the other files */ + if (user != NULL user != thunar_file_get_user (file)) +user = NULL; + + if (group != NULL group != thunar_file_get_group (file)) +group = NULL; + + for (n = 0; n 3; n++) +if (file_modes[n] != modes[n]) + modes[n] = -1; +} + + n_files++; +} + file = THUNAR_FILE (chooser-files-data); /* allocate a new store for the group combo box */ @@ -842,69 +886,8 @@ thunar_permissions_chooser_file_changed (ThunarPermissionsChooser *chooser) gtk_combo_box_set_model (GTK_COMBO_BOX (chooser-group_combo), GTK_TREE_MODEL (store)); /* determine the owner of the new file */ - user = thunar_file_get_user (file); if (G_LIKELY (user != NULL)) { - /* determine the group of the new file */ - group = thunar_file_get_group (file); - if (G_LIKELY (group != NULL)) -{ - /* check if we have superuser privileges */ - if (G_UNLIKELY (geteuid () == 0)) -{ - /* determine all groups in the system */ - user_manager = thunar_user_manager_get_default (); - groups = thunar_user_manager_get_all_groups (user_manager); - g_object_unref (G_OBJECT (user_manager)); -} - else -{ - /* determine the groups for the user and take a copy */ - groups = g_list_copy (thunar_user_get_groups (user)); - g_list_foreach (groups, (GFunc) g_object_ref, NULL); -} - - /* make sure that the group list includes the file group */ - if (G_UNLIKELY (g_list_find (groups, group) == NULL)) -groups = g_list_prepend (groups, g_object_ref (G_OBJECT (group))); - - /* sort the groups according to group_compare() */
[Xfce4-commits] thunar:nick/gseal+clean Don't error during counting with multiple files.
Updating branch refs/heads/nick/gseal+clean to 5c0f6c9dd19e2d4b87b2aedbc007aeea92e01431 (commit) from 0156959702eaf110e64532d44876033fc41fc617 (commit) commit 5c0f6c9dd19e2d4b87b2aedbc007aeea92e01431 Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 17:56:09 2012 +0200 Don't error during counting with multiple files. Handle this differently, so the count job does not error, but if it turns out all content was unreadable the size label will show a permission denied error. thunar/thunar-deep-count-job.c |6 +++--- thunar/thunar-size-label.c | 34 +- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/thunar/thunar-deep-count-job.c b/thunar/thunar-deep-count-job.c index 6613dfe..23d5a94 100644 --- a/thunar/thunar-deep-count-job.c +++ b/thunar/thunar-deep-count-job.c @@ -220,7 +220,8 @@ thunar_deep_count_job_process (ExoJob*job, /* directory was unreadable */ count_job-unreadable_directory_count += 1; - if (toplevel_file) + if (toplevel_file + g_list_length (count_job-files) 2) { /* we only bail out if the job file is unreadable */ success = FALSE; @@ -228,8 +229,7 @@ thunar_deep_count_job_process (ExoJob*job, else { /* ignore errors from files other than the job file */ - g_error_free (*error); - *error = NULL; + g_clear_error (error); } } else diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index e1462c8..3f0c12b 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -368,22 +368,30 @@ thunar_size_label_status_update (ThunarDeepCountJob *job, /* determine the total number of items */ n = file_count + directory_count + unreadable_directory_count; - /* update the label */ - size_string = g_format_size (total_size); - text = g_strdup_printf (ngettext (%u item, totalling %s, %u items, totalling %s, n), n, size_string); - g_free (size_string); - - if (unreadable_directory_count 0) + if (G_LIKELY (n unreadable_directory_count)) { - /* TRANSLATORS: this is shows if during the deep count size - * directories were not accessible */ - unreable_text = g_strconcat (text, \n, _((some contents unreadable)), NULL); + /* update the label */ + size_string = g_format_size (total_size); + text = g_strdup_printf (ngettext (%u item, totalling %s, %u items, totalling %s, n), n, size_string); + g_free (size_string); + + if (unreadable_directory_count 0) +{ + /* TRANSLATORS: this is shows if during the deep count size + * directories were not accessible */ + unreable_text = g_strconcat (text, \n, _((some contents unreadable)), NULL); + g_free (text); + text = unreable_text; +} + + gtk_label_set_text (GTK_LABEL (size_label-label), text); g_free (text); - text = unreable_text; } - - gtk_label_set_text (GTK_LABEL (size_label-label), text); - g_free (text); + else +{ + /* nothing was readable, so permission was denied */ + gtk_label_set_text (GTK_LABEL (size_label-label), _(Permission denied)); +} } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:nick/gseal+clean Depend on Gtk 2.24 and Glib 2.28.
Updating branch refs/heads/nick/gseal+clean to b1c6a23ab5993c29bd05c38bdad7677e5cb3440b (commit) from 5c0f6c9dd19e2d4b87b2aedbc007aeea92e01431 (commit) commit b1c6a23ab5993c29bd05c38bdad7677e5cb3440b Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 18:33:20 2012 +0200 Depend on Gtk 2.24 and Glib 2.28. configure.in.in | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.in.in b/configure.in.in index aebe4f7..619a231 100644 --- a/configure.in.in +++ b/configure.in.in @@ -154,11 +154,11 @@ dnl *** dnl *** Check for required packages *** dnl *** XDT_CHECK_PACKAGE([EXO], [exo-1], [0.6.0]) -XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) +XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.28.0]) +XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.28.0]) +XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.28.0]) +XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.28.0]) +XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.24.0]) XDT_CHECK_PACKAGE([GDK_PIXBUF], [gdk-pixbuf-2.0], [2.14.0]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.9.0]) XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.9.0]) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:nick/gseal+clean Finalize permission handing for multiple files.
Updating branch refs/heads/nick/gseal+clean to 0156959702eaf110e64532d44876033fc41fc617 (commit) from 97ee43c303a0dea76f42ea17e933e24d2d1ca8cf (commit) commit 0156959702eaf110e64532d44876033fc41fc617 Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 17:30:39 2012 +0200 Finalize permission handing for multiple files. thunar/thunar-deep-count-job.c |3 +- thunar/thunar-permissions-chooser.c | 67 ++ 2 files changed, 45 insertions(+), 25 deletions(-) diff --git a/thunar/thunar-deep-count-job.c b/thunar/thunar-deep-count-job.c index 5a8f7ed..6613dfe 100644 --- a/thunar/thunar-deep-count-job.c +++ b/thunar/thunar-deep-count-job.c @@ -1,6 +1,7 @@ /* vi:set sw=2 sts=2 ts=2 et ai: */ /*- - * Copyright (c) 2009 Jannis Pohlmann jan...@xfce.org. + * Copyright (c) 2009 Jannis Pohlmann jan...@xfce.org + * Copyright (c) 2012 Nick Schermer n...@xfce.org * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/thunar/thunar-permissions-chooser.c b/thunar/thunar-permissions-chooser.c index 5ebcc93..552b5c2 100644 --- a/thunar/thunar-permissions-chooser.c +++ b/thunar/thunar-permissions-chooser.c @@ -2,6 +2,7 @@ /*- * Copyright (c) 2005-2006 Benedikt Meurer be...@xfce.org * Copyright (c) 2009 Jannis Pohlmann jan...@xfce.org + * Copyright (c) 2012 Nick Schermer n...@xfce.org * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free @@ -84,7 +85,7 @@ static void thunar_permissions_chooser_set_property (GObject static gint thunar_permissions_chooser_ask_recursive (ThunarPermissionsChooser *chooser); static void thunar_permissions_chooser_change_group (ThunarPermissionsChooser *chooser, guint32 gid); -static void thunar_permissions_chooser_change_mode (ThunarPermissionsChooser *chooser, +static gboolean thunar_permissions_chooser_change_mode (ThunarPermissionsChooser *chooser, ThunarFileMode dir_mask, ThunarFileMode dir_mode, ThunarFileMode file_mask, @@ -194,8 +195,6 @@ static void thunar_permissions_chooser_init (ThunarPermissionsChooser *chooser) { GtkCellRenderer *renderer_text; - GtkListStore*store; - GtkTreeIter iter; GtkWidget *separator; GtkWidget *button; GtkWidget *label; @@ -206,13 +205,6 @@ thunar_permissions_chooser_init (ThunarPermissionsChooser *chooser) /* setup the chooser */ gtk_container_set_border_width (GTK_CONTAINER (chooser), 12); - /* allocate the store for the permission combos */ - store = gtk_list_store_new (1, G_TYPE_STRING); - gtk_list_store_insert_with_values (store, iter, 0, 0, _(None), -1); /* */ - gtk_list_store_insert_with_values (store, iter, 1, 0, _(Write only), -1); /* 0002 */ - gtk_list_store_insert_with_values (store, iter, 2, 0, _(Read only), -1); /* 0004 */ - gtk_list_store_insert_with_values (store, iter, 3, 0, _(Read Write), -1); /* 0006 */ - /* allocate the shared renderer for the various combo boxes */ renderer_text = gtk_cell_renderer_text_new (); @@ -246,7 +238,7 @@ thunar_permissions_chooser_init (ThunarPermissionsChooser *chooser) gtk_table_attach (GTK_TABLE (chooser-table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); - chooser-access_combos[2] = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); + chooser-access_combos[2] = gtk_combo_box_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (chooser-access_combos[2]), renderer_text, TRUE); gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (chooser-access_combos[2]), renderer_text, text, 0); exo_binding_new (G_OBJECT (chooser), mutable, G_OBJECT (chooser-access_combos[2]), sensitive); @@ -287,7 +279,7 @@ thunar_permissions_chooser_init (ThunarPermissionsChooser *chooser) gtk_table_attach (GTK_TABLE (chooser-table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (label); - chooser-access_combos[1] = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); + chooser-access_combos[1] = gtk_combo_box_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (chooser-access_combos[1]), renderer_text, TRUE); gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (chooser-access_combos[1]), renderer_text, text, 0); exo_binding_new (G_OBJECT (chooser), mutable, G_OBJECT
[Xfce4-commits] thunar:nick/gseal+clean Drop usage of GtkObject and use GObject.
Updating branch refs/heads/nick/gseal+clean to 0bf9ab24e8a4cb578bd24d80d67de97ff06755cf (commit) from 57ff06dc5b27dc8e1d40561a747c785ef68cf526 (commit) commit 0bf9ab24e8a4cb578bd24d80d67de97ff06755cf Author: Nick Schermer n...@xfce.org Date: Fri May 25 19:23:37 2012 +0200 Drop usage of GtkObject and use GObject. Implement the destroy signal in ThunarFolder so we can drop the usage of GtkObject. thunar/thunar-folder.c | 78 ++- thunar/thunar-folder.h |2 + 2 files changed, 71 insertions(+), 9 deletions(-) diff --git a/thunar/thunar-folder.c b/thunar/thunar-folder.c index 9ea6939..e9da360 100644 --- a/thunar/thunar-folder.c +++ b/thunar/thunar-folder.c @@ -44,6 +44,7 @@ enum /* signal identifiers */ enum { + DESTROY, ERROR, FILES_ADDED, FILES_REMOVED, @@ -52,6 +53,7 @@ enum +static void thunar_folder_dispose (GObject *object); static void thunar_folder_finalize(GObject *object); static void thunar_folder_get_property(GObject *object, guint prop_id, @@ -61,6 +63,7 @@ static void thunar_folder_set_property (GObject guint prop_uid, const GValue *value, GParamSpec *pspec); +static void thunar_folder_real_destroy(ThunarFolder *folder); static void thunar_folder_error (ExoJob *job, GError *error, ThunarFolder *folder); @@ -85,9 +88,10 @@ static void thunar_folder_monitor (GFileMonitor struct _ThunarFolderClass { - GtkObjectClass __parent__; + GObjectClass __parent__; /* signals */ + void (*destroy) (ThunarFolder *folder); void (*error) (ThunarFolder *folder, const GError *error); void (*files_added) (ThunarFolder *folder, @@ -98,7 +102,7 @@ struct _ThunarFolderClass struct _ThunarFolder { - GtkObject __parent__; + GObject __parent__; ThunarJob *job; @@ -106,6 +110,8 @@ struct _ThunarFolder GList *new_files; GList *files; + guint in_destruction : 1; + ThunarFileMonitor *file_monitor; GFileMonitor *monitor; @@ -118,7 +124,7 @@ static GQuark thunar_folder_quark; -G_DEFINE_TYPE (ThunarFolder, thunar_folder, GTK_TYPE_OBJECT) +G_DEFINE_TYPE (ThunarFolder, thunar_folder, G_TYPE_OBJECT) @@ -128,10 +134,13 @@ thunar_folder_class_init (ThunarFolderClass *klass) GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (klass); + gobject_class-dispose = thunar_folder_dispose; gobject_class-finalize = thunar_folder_finalize; gobject_class-get_property = thunar_folder_get_property; gobject_class-set_property = thunar_folder_set_property; + klass-destroy = thunar_folder_real_destroy; + /** * ThunarFolder::corresponding-file: * @@ -143,7 +152,7 @@ thunar_folder_class_init (ThunarFolderClass *klass) corresponding-file, corresponding-file, THUNAR_TYPE_FILE, -G_PARAM_READABLE +G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); @@ -160,6 +169,20 @@ thunar_folder_class_init (ThunarFolderClass *klass) loading, FALSE, EXO_PARAM_READABLE)); + /** + * ThunarFolder::destroy: + * @folder : a #ThunarFolder. + * + * Emitted when the #ThunarFolder is destroyed. + **/ + folder_signals[DESTROY] = +g_signal_new (I_(destroy), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_CLEANUP | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS, + G_STRUCT_OFFSET (ThunarFolderClass, destroy), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); /** * ThunarFolder::error: @@ -227,6 +250,23 @@ thunar_folder_init (ThunarFolder *folder) static void +thunar_folder_dispose (GObject
[Xfce4-commits] thunar:nick/gseal+clean Drop the button from the entry toolbar.
Updating branch refs/heads/nick/gseal+clean to f8232fb70d02acdd9d9591153c883769060f5385 (commit) from d97c66f4396de4b5d9d6a4bed4f6e21d54f25860 (commit) commit f8232fb70d02acdd9d9591153c883769060f5385 Author: Nick Schermer n...@xfce.org Date: Sun May 27 10:42:21 2012 +0200 Drop the button from the entry toolbar. thunar/thunar-location-entry.c | 346 thunar/thunar-location-entry.h |2 - 2 files changed, 0 insertions(+), 348 deletions(-) diff --git a/thunar/thunar-location-entry.c b/thunar/thunar-location-entry.c index d64dbc0..4c27b87 100644 --- a/thunar/thunar-location-entry.c +++ b/thunar/thunar-location-entry.c @@ -76,10 +76,6 @@ static gbooleanthunar_location_entry_accept_focus (ThunarLocationBa static voidthunar_location_entry_activate (GtkWidget *path_entry, ThunarLocationEntry *location_entry); static gbooleanthunar_location_entry_reset (ThunarLocationEntry *location_entry); -static voidthunar_location_entry_button_clicked(GtkWidget *button, - ThunarLocationEntry *location_entry); -static voidthunar_location_entry_item_activated(GtkWidget *item, - ThunarLocationEntry *location_entry); @@ -184,34 +180,13 @@ thunar_location_entry_location_bar_init (ThunarLocationBarIface *iface) static void thunar_location_entry_init (ThunarLocationEntry *location_entry) { - GtkSizeGroup *size_group; - GtkWidget*button; - GtkWidget*arrow; - gtk_box_set_spacing (GTK_BOX (location_entry), 0); - gtk_container_set_border_width (GTK_CONTAINER (location_entry), 4); location_entry-path_entry = thunar_path_entry_new (); exo_binding_new (G_OBJECT (location_entry), current-directory, G_OBJECT (location_entry-path_entry), current-file); g_signal_connect_after (G_OBJECT (location_entry-path_entry), activate, G_CALLBACK (thunar_location_entry_activate), location_entry); gtk_box_pack_start (GTK_BOX (location_entry), location_entry-path_entry, TRUE, TRUE, 0); gtk_widget_show (location_entry-path_entry); - - button = gtk_toggle_button_new (); - g_signal_connect (G_OBJECT (button), clicked, G_CALLBACK (thunar_location_entry_button_clicked), location_entry); - g_signal_connect (G_OBJECT (button), pressed, G_CALLBACK (thunar_location_entry_button_clicked), location_entry); - gtk_box_pack_start (GTK_BOX (location_entry), button, FALSE, FALSE, 0); - gtk_widget_show (button); - - arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE); - gtk_container_add (GTK_CONTAINER (button), arrow); - gtk_widget_show (arrow); - - /* make sure the entry and the button request the same height */ - size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL); - gtk_size_group_add_widget (size_group, location_entry-path_entry); - gtk_size_group_add_widget (size_group, button); - g_object_unref (G_OBJECT (size_group)); } @@ -426,8 +401,6 @@ thunar_location_entry_poke_file_finish (ThunarBrowser *browser, - - static void thunar_location_entry_activate (GtkWidget *path_entry, ThunarLocationEntry *location_entry) @@ -459,322 +432,3 @@ thunar_location_entry_reset (ThunarLocationEntry *location_entry) return TRUE; } - - - -static void -menu_position (GtkMenu *menu, - gint *x, - gint *y, - gboolean *push_in, - gpointer entry) -{ - GtkRequisition entry_request; - GtkRequisition menu_request; - GdkRectangle geometry; - GdkScreen *screen; - GtkWidget *toplevel = gtk_widget_get_toplevel (entry); - gint monitor; - gint x0; - gint y0; - - gtk_widget_translate_coordinates (GTK_WIDGET (entry), toplevel, 0, 0, x0, y0); - - gtk_widget_size_request (GTK_WIDGET (entry), entry_request); - gtk_widget_size_request (GTK_WIDGET (menu), menu_request); - - gdk_window_get_position (GTK_WIDGET (entry)-window, x, y); - - *x += x0 + gtk_container_get_border_width (GTK_CONTAINER (entry)); - *y += y0 + (entry_request.height - gtk_container_get_border_width (GTK_CONTAINER (entry))); - - /* verify the the menu is on-screen */ - screen = gtk_widget_get_screen (GTK_WIDGET (entry)); - if (G_LIKELY (screen != NULL)) -{ - monitor = gdk_screen_get_monitor_at_point (screen, *x, *y); - gdk_screen_get_monitor_geometry (screen, monitor, geometry); - if (*y + menu_request.height geometry.y + geometry.height) -*y -= menu_request.height - entry_request.height; -} - - *push_in = TRUE; -} - - - -static void -thunar_location_entry_button_clicked (GtkWidget *button, -
[Xfce4-commits] thunar:nick/gseal+clean Use GtkLabel for actions, drop SexyUrlLabel.
Updating branch refs/heads/nick/gseal+clean to 57ff06dc5b27dc8e1d40561a747c785ef68cf526 (commit) from b1c6a23ab5993c29bd05c38bdad7677e5cb3440b (commit) commit 57ff06dc5b27dc8e1d40561a747c785ef68cf526 Author: Nick Schermer n...@xfce.org Date: Wed May 16 18:05:26 2012 +0200 Use GtkLabel for actions, drop SexyUrlLabel. thunar/Makefile.am |2 - thunar/sexy-url-label.c| 842 thunar/sexy-url-label.h| 74 thunar/thunar-preferences-dialog.c | 10 +- 4 files changed, 4 insertions(+), 924 deletions(-) diff --git a/thunar/Makefile.am b/thunar/Makefile.am index 45175ca..0f9c198 100644 --- a/thunar/Makefile.am +++ b/thunar/Makefile.am @@ -37,8 +37,6 @@ thunar_SOURCES = \ $(thunar_dbus_sources) \ $(thunar_notify_sources)\ main.c \ - sexy-url-label.c\ - sexy-url-label.h\ thunar-abstract-dialog.c\ thunar-abstract-dialog.h\ thunar-abstract-icon-view-ui.h \ diff --git a/thunar/sexy-url-label.c b/thunar/sexy-url-label.c deleted file mode 100644 index 0be9e1d..000 --- a/thunar/sexy-url-label.c +++ /dev/null @@ -1,842 +0,0 @@ -/* - * @file libsexy/sexy-url-label.c URL Label - * - * @Copyright (C) 2007 Benedikt Meurer be...@xfce.org - * @Copyright (C) 2005-2006 Christian Hammond - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include config.h -#endif - -#ifdef HAVE_MEMORY_H -#include memory.h -#endif -#include stdio.h -#ifdef HAVE_STRING_H -#include string.h -#endif - -#include sexy-url-label.h - -#define SEXY_URL_LABEL_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE((obj), SEXY_TYPE_URL_LABEL, \ - SexyUrlLabelPrivate)) - -typedef struct -{ - int start; - int end; - const gchar *url; - -} SexyUrlLabelLink; - -typedef struct -{ - GList *links; - GList *urls; - SexyUrlLabelLink *active_link; - GtkWidget *popup_menu; - GdkWindow *event_window; - - int layout_x; - int layout_y; - - size_t wrap_width; - - GString *temp_markup_result; - -} SexyUrlLabelPrivate; - -/* - * NOTE: This *MUST* match the LabelWrapWidth struct in gtklabel.c. - */ -typedef struct -{ - gint width; - PangoFontDescription *font_desc; - -} LabelWrapWidth; - -enum -{ - URL_ACTIVATED, - LAST_SIGNAL -}; - -static void sexy_url_label_finalize(GObject *obj); -static void sexy_url_label_realize(GtkWidget *widget); -static void sexy_url_label_unrealize(GtkWidget *widget); -static void sexy_url_label_map(GtkWidget *widget); -static void sexy_url_label_unmap(GtkWidget *widget); -static void sexy_url_label_size_allocate(GtkWidget *widget, - GtkAllocation *allocation); -static gboolean sexy_url_label_motion_notify_event(GtkWidget *widget, - GdkEventMotion *event); -static gboolean sexy_url_label_leave_notify_event(GtkWidget *widget, - GdkEventCrossing *event); -static gboolean sexy_url_label_button_press_event(GtkWidget *widget, - GdkEventButton *event); - -static void open_link_activate_cb(GtkMenuItem *menu_item, - SexyUrlLabel *url_label); -static void copy_link_activate_cb(GtkMenuItem *menu_item, - SexyUrlLabel *url_label); - -static void sexy_url_label_clear_links(SexyUrlLabel *url_label); -static void
[Xfce4-commits] thunar:nick/gseal+clean Use a GtkSpinner instead of the ThunarThrobber.
Updating branch refs/heads/nick/gseal+clean to d97c66f4396de4b5d9d6a4bed4f6e21d54f25860 (commit) from 0bf9ab24e8a4cb578bd24d80d67de97ff06755cf (commit) commit d97c66f4396de4b5d9d6a4bed4f6e21d54f25860 Author: Nick Schermer n...@xfce.org Date: Fri May 25 20:18:19 2012 +0200 Use a GtkSpinner instead of the ThunarThrobber. This is a new widget since 2.20, so we can use it. In Gtk3 this widget also has a special rendering class in the theme engine. .gitignore |1 - po/POTFILES.in |1 - thunar/Makefile.am |9 - thunar/thunar-size-label.c | 39 ++-- thunar/thunar-throbber-fallback.h | 31 --- thunar/thunar-throbber-fallback.png | Bin 2713 - 0 bytes thunar/thunar-throbber.c| 371 --- thunar/thunar-throbber.h| 47 - thunar/thunar-window.c | 16 +- 9 files changed, 28 insertions(+), 487 deletions(-) diff --git a/.gitignore b/.gitignore index 245172f..51fb0b1 100644 --- a/.gitignore +++ b/.gitignore @@ -107,7 +107,6 @@ tests/data/.*.swp thunar/*.loT thunar/.*.swp thunar/thunar-fallback-icon.c -thunar/thunar-throbber-fallback.c thunar/thunar-thumbnail-frame.c thunar/thunar-thumbnailer-manager-proxy.h thunar/thunar-thumbnailer-proxy.h diff --git a/po/POTFILES.in b/po/POTFILES.in index 63e17af..751ba59 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -78,7 +78,6 @@ thunar/thunar-statusbar.c thunar/thunar-stock.c thunar/thunar-templates-action.c thunar/thunar-text-renderer.c -thunar/thunar-throbber.c thunar/thunar-thumbnail-cache.c thunar/thunar-thumbnailer.c thunar/thunar-transfer-job.c diff --git a/thunar/Makefile.am b/thunar/Makefile.am index 0f9c198..4065d87 100644 --- a/thunar/Makefile.am +++ b/thunar/Makefile.am @@ -195,10 +195,6 @@ thunar_SOURCES = \ thunar-templates-action.h \ thunar-text-renderer.c \ thunar-text-renderer.h \ - thunar-throbber.c \ - thunar-throbber.h \ - thunar-throbber-fallback.c \ - thunar-throbber-fallback.h \ thunar-thumbnail-cache.c\ thunar-thumbnail-cache.h\ thunar-thumbnailer.c\ @@ -318,7 +314,6 @@ DISTCLEANFILES += \ thunar-shortcuts-pane-ui.h \ thunar-renamer-dialog-ui.h \ thunar-standard-view-ui.h \ - thunar-throbber-fallback.c \ thunar-thumbnail-frame.c\ thunar-window-ui.h @@ -331,7 +326,6 @@ BUILT_SOURCES = \ thunar-shortcuts-pane-ui.h \ thunar-renamer-dialog-ui.h \ thunar-standard-view-ui.h \ - thunar-throbber-fallback.c \ thunar-thumbnail-frame.c\ thunar-window-ui.h @@ -356,9 +350,6 @@ thunar-thumbnail-cache-proxy.h: $(srcdir)/thunar-thumbnail-cache-dbus.xml Makefi ) endif -thunar-throbber-fallback.c: $(srcdir)/thunar-throbber-fallback.png Makefile - $(AM_V_GEN) (echo #include thunar/thunar-throbber-fallback.h gdk-pixbuf-csource --extern --raw --stream --name=thunar_throbber_fallback $(srcdir)/thunar-throbber-fallback.png) thunar-throbber-fallback.c - thunar-thumbnail-frame.c: $(srcdir)/thunar-thumbnail-frame.png Makefile $(AM_V_GEN) (echo #include thunar/thunar-thumbnail-frame.h gdk-pixbuf-csource --extern --raw --stream --name=thunar_thumbnail_frame $(srcdir)/thunar-thumbnail-frame.png) thunar-thumbnail-frame.c diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index 3f0c12b..679a256 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -33,7 +33,6 @@ #include thunar/thunar-gtk-extensions.h #include thunar/thunar-private.h #include thunar/thunar-size-label.h -#include thunar/thunar-throbber.h #include thunar/thunar-deep-count-job.h @@ -88,7 +87,7 @@ struct _ThunarSizeLabel GList *files; GtkWidget *label; - GtkWidget *throbber; + GtkWidget *spinner; }; @@ -132,17 +131,19 @@ thunar_size_label_init (ThunarSizeLabel
[Xfce4-commits] thunar:nick/gseal+clean Use g_(s)list_free_full where possible.
Updating branch refs/heads/nick/gseal+clean to be7de02a3558e4fc8343809831e2f2c53abee5fb (commit) from f8232fb70d02acdd9d9591153c883769060f5385 (commit) commit be7de02a3558e4fc8343809831e2f2c53abee5fb Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 18:32:05 2012 +0200 Use g_(s)list_free_full where possible. plugins/thunar-uca/thunar-uca-model.c| 11 +-- thunar/thunar-application.c |6 ++ thunar/thunar-chooser-model.c|7 ++- thunar/thunar-dbus-service.c |3 +-- thunar/thunar-file.c |6 ++ thunar/thunar-list-model.c |9 +++-- thunar/thunar-permissions-chooser.c |3 +-- thunar/thunar-properties-dialog.c|3 +-- thunar/thunar-renamer-dialog.c |6 ++ thunar/thunar-renamer-model.c|9 + thunar/thunar-renamer-pair.c |8 thunar/thunar-renamer-pair.h |2 +- thunar/thunar-sendto-model.c |9 +++-- thunar/thunar-shortcuts-model.c |3 +-- thunar/thunar-standard-view.c| 21 +++-- thunar/thunar-templates-action.c |3 +-- thunar/thunar-thumbnail-cache.c | 23 +++ thunar/thunar-transfer-job.c |8 thunar/thunar-tree-model.c |6 ++ thunar/thunar-user.c |6 ++ thunar/thunar-window.c |3 +-- thunarx/thunarx-file-info.c |8 ++-- thunarx/thunarx-menu-provider.c |9 +++-- thunarx/thunarx-preferences-provider.c |3 +-- thunarx/thunarx-property-page-provider.c |3 +-- thunarx/thunarx-provider-factory.c |3 +-- thunarx/thunarx-renamer-provider.c |3 +-- thunarx/thunarx-renamer.c|3 +-- 28 files changed, 67 insertions(+), 120 deletions(-) diff --git a/plugins/thunar-uca/thunar-uca-model.c b/plugins/thunar-uca/thunar-uca-model.c index 59c1d03..aa388b0 100644 --- a/plugins/thunar-uca/thunar-uca-model.c +++ b/plugins/thunar-uca/thunar-uca-model.c @@ -122,7 +122,7 @@ static gboolean thunar_uca_model_load_from_file (ThunarUcaModel const gchar *filename, GError **error); static void thunar_uca_model_item_reset (ThunarUcaModelItem *item); -static void thunar_uca_model_item_free (ThunarUcaModelItem *item); +static void thunar_uca_model_item_free(gpointer data); static void start_element_handler (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, @@ -284,8 +284,7 @@ thunar_uca_model_finalize (GObject *object) g_object_unref (G_OBJECT (uca_model-icon_factory)); /* release all items */ - g_list_foreach (uca_model-items, (GFunc) thunar_uca_model_item_free, NULL); - g_list_free (uca_model-items); + g_list_free_full (uca_model-items, thunar_uca_model_item_free); (*G_OBJECT_CLASS (thunar_uca_model_parent_class)-finalize) (object); } @@ -600,8 +599,9 @@ thunar_uca_model_item_reset (ThunarUcaModelItem *item) static void -thunar_uca_model_item_free (ThunarUcaModelItem *item) +thunar_uca_model_item_free (gpointer data) { + ThunarUcaModelItem *item = data; thunar_uca_model_item_reset (item); g_free (item); } @@ -1000,8 +1000,7 @@ types_from_mime_type (const gchar *mime_type) * * The caller is responsible to free the returned list using * informalexampleprogramlisting - * g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL); - * g_list_free (list); + * g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free); * /programlisting/informalexample * * Return value: the list of #GtkTreePath!s to items diff --git a/thunar/thunar-application.c b/thunar/thunar-application.c index 31ad89e..b619bbe 100644 --- a/thunar/thunar-application.c +++ b/thunar/thunar-application.c @@ -268,8 +268,7 @@ thunar_application_finalize (GObject *object) g_source_remove (application-volman_idle_id); /* drop all pending volume manager UDIs */ - g_slist_foreach (application-volman_udis, (GFunc) g_free, NULL); - g_slist_free (application-volman_udis); + g_slist_free_full (application-volman_udis, g_free); /* disconnect from the udev client */ g_object_unref (application-udev_client); @@ -659,8 +658,7 @@ thunar_application_volman_idle (gpointer user_data) else { /* drop all pending HAL device UDIs */ - g_slist_foreach (application-volman_udis, (GFunc) g_free, NULL); - g_slist_free (application-volman_udis);
[Xfce4-commits] thunar:nick/gseal+clean Deleting branch nick/gseal+clean
Deleting branch refs/heads/nick/gseal+clean ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Depend on Gtk 2.24 and Glib 2.28.
Updating branch refs/heads/master to 076f73c290a2a6d5e880344eb15f117824a0a7ba (commit) from a6bed8f13d9e39fbf86b6f4128c06df9028e9d83 (commit) commit 076f73c290a2a6d5e880344eb15f117824a0a7ba Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 18:33:20 2012 +0200 Depend on Gtk 2.24 and Glib 2.28. configure.in.in | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.in.in b/configure.in.in index aebe4f7..619a231 100644 --- a/configure.in.in +++ b/configure.in.in @@ -154,11 +154,11 @@ dnl *** dnl *** Check for required packages *** dnl *** XDT_CHECK_PACKAGE([EXO], [exo-1], [0.6.0]) -XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) +XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.28.0]) +XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.28.0]) +XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.28.0]) +XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.28.0]) +XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.24.0]) XDT_CHECK_PACKAGE([GDK_PIXBUF], [gdk-pixbuf-2.0], [2.14.0]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.9.0]) XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.9.0]) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Drop usage of GtkObject and use GObject.
Updating branch refs/heads/master to c1420216a140e6e87b9291f4a5dcc0223c4432e7 (commit) from 463f66b5f077c41f84962c78dcdfe44101accbec (commit) commit c1420216a140e6e87b9291f4a5dcc0223c4432e7 Author: Nick Schermer n...@xfce.org Date: Fri May 25 19:23:37 2012 +0200 Drop usage of GtkObject and use GObject. Implement the destroy signal in ThunarFolder so we can drop the usage of GtkObject. thunar/thunar-folder.c | 78 ++- thunar/thunar-folder.h |2 + 2 files changed, 71 insertions(+), 9 deletions(-) diff --git a/thunar/thunar-folder.c b/thunar/thunar-folder.c index 9ea6939..e9da360 100644 --- a/thunar/thunar-folder.c +++ b/thunar/thunar-folder.c @@ -44,6 +44,7 @@ enum /* signal identifiers */ enum { + DESTROY, ERROR, FILES_ADDED, FILES_REMOVED, @@ -52,6 +53,7 @@ enum +static void thunar_folder_dispose (GObject *object); static void thunar_folder_finalize(GObject *object); static void thunar_folder_get_property(GObject *object, guint prop_id, @@ -61,6 +63,7 @@ static void thunar_folder_set_property (GObject guint prop_uid, const GValue *value, GParamSpec *pspec); +static void thunar_folder_real_destroy(ThunarFolder *folder); static void thunar_folder_error (ExoJob *job, GError *error, ThunarFolder *folder); @@ -85,9 +88,10 @@ static void thunar_folder_monitor (GFileMonitor struct _ThunarFolderClass { - GtkObjectClass __parent__; + GObjectClass __parent__; /* signals */ + void (*destroy) (ThunarFolder *folder); void (*error) (ThunarFolder *folder, const GError *error); void (*files_added) (ThunarFolder *folder, @@ -98,7 +102,7 @@ struct _ThunarFolderClass struct _ThunarFolder { - GtkObject __parent__; + GObject __parent__; ThunarJob *job; @@ -106,6 +110,8 @@ struct _ThunarFolder GList *new_files; GList *files; + guint in_destruction : 1; + ThunarFileMonitor *file_monitor; GFileMonitor *monitor; @@ -118,7 +124,7 @@ static GQuark thunar_folder_quark; -G_DEFINE_TYPE (ThunarFolder, thunar_folder, GTK_TYPE_OBJECT) +G_DEFINE_TYPE (ThunarFolder, thunar_folder, G_TYPE_OBJECT) @@ -128,10 +134,13 @@ thunar_folder_class_init (ThunarFolderClass *klass) GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (klass); + gobject_class-dispose = thunar_folder_dispose; gobject_class-finalize = thunar_folder_finalize; gobject_class-get_property = thunar_folder_get_property; gobject_class-set_property = thunar_folder_set_property; + klass-destroy = thunar_folder_real_destroy; + /** * ThunarFolder::corresponding-file: * @@ -143,7 +152,7 @@ thunar_folder_class_init (ThunarFolderClass *klass) corresponding-file, corresponding-file, THUNAR_TYPE_FILE, -G_PARAM_READABLE +G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); @@ -160,6 +169,20 @@ thunar_folder_class_init (ThunarFolderClass *klass) loading, FALSE, EXO_PARAM_READABLE)); + /** + * ThunarFolder::destroy: + * @folder : a #ThunarFolder. + * + * Emitted when the #ThunarFolder is destroyed. + **/ + folder_signals[DESTROY] = +g_signal_new (I_(destroy), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_CLEANUP | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS, + G_STRUCT_OFFSET (ThunarFolderClass, destroy), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); /** * ThunarFolder::error: @@ -227,6 +250,23 @@ thunar_folder_init (ThunarFolder *folder) static void +thunar_folder_dispose (GObject *object) +{ +
[Xfce4-commits] thunar:master Use GtkLabel for actions, drop SexyUrlLabel.
Updating branch refs/heads/master to 463f66b5f077c41f84962c78dcdfe44101accbec (commit) from 076f73c290a2a6d5e880344eb15f117824a0a7ba (commit) commit 463f66b5f077c41f84962c78dcdfe44101accbec Author: Nick Schermer n...@xfce.org Date: Wed May 16 18:05:26 2012 +0200 Use GtkLabel for actions, drop SexyUrlLabel. thunar/Makefile.am |2 - thunar/sexy-url-label.c| 842 thunar/sexy-url-label.h| 74 thunar/thunar-preferences-dialog.c | 10 +- 4 files changed, 4 insertions(+), 924 deletions(-) diff --git a/thunar/Makefile.am b/thunar/Makefile.am index 45175ca..0f9c198 100644 --- a/thunar/Makefile.am +++ b/thunar/Makefile.am @@ -37,8 +37,6 @@ thunar_SOURCES = \ $(thunar_dbus_sources) \ $(thunar_notify_sources)\ main.c \ - sexy-url-label.c\ - sexy-url-label.h\ thunar-abstract-dialog.c\ thunar-abstract-dialog.h\ thunar-abstract-icon-view-ui.h \ diff --git a/thunar/sexy-url-label.c b/thunar/sexy-url-label.c deleted file mode 100644 index 0be9e1d..000 --- a/thunar/sexy-url-label.c +++ /dev/null @@ -1,842 +0,0 @@ -/* - * @file libsexy/sexy-url-label.c URL Label - * - * @Copyright (C) 2007 Benedikt Meurer be...@xfce.org - * @Copyright (C) 2005-2006 Christian Hammond - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include config.h -#endif - -#ifdef HAVE_MEMORY_H -#include memory.h -#endif -#include stdio.h -#ifdef HAVE_STRING_H -#include string.h -#endif - -#include sexy-url-label.h - -#define SEXY_URL_LABEL_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE((obj), SEXY_TYPE_URL_LABEL, \ - SexyUrlLabelPrivate)) - -typedef struct -{ - int start; - int end; - const gchar *url; - -} SexyUrlLabelLink; - -typedef struct -{ - GList *links; - GList *urls; - SexyUrlLabelLink *active_link; - GtkWidget *popup_menu; - GdkWindow *event_window; - - int layout_x; - int layout_y; - - size_t wrap_width; - - GString *temp_markup_result; - -} SexyUrlLabelPrivate; - -/* - * NOTE: This *MUST* match the LabelWrapWidth struct in gtklabel.c. - */ -typedef struct -{ - gint width; - PangoFontDescription *font_desc; - -} LabelWrapWidth; - -enum -{ - URL_ACTIVATED, - LAST_SIGNAL -}; - -static void sexy_url_label_finalize(GObject *obj); -static void sexy_url_label_realize(GtkWidget *widget); -static void sexy_url_label_unrealize(GtkWidget *widget); -static void sexy_url_label_map(GtkWidget *widget); -static void sexy_url_label_unmap(GtkWidget *widget); -static void sexy_url_label_size_allocate(GtkWidget *widget, - GtkAllocation *allocation); -static gboolean sexy_url_label_motion_notify_event(GtkWidget *widget, - GdkEventMotion *event); -static gboolean sexy_url_label_leave_notify_event(GtkWidget *widget, - GdkEventCrossing *event); -static gboolean sexy_url_label_button_press_event(GtkWidget *widget, - GdkEventButton *event); - -static void open_link_activate_cb(GtkMenuItem *menu_item, - SexyUrlLabel *url_label); -static void copy_link_activate_cb(GtkMenuItem *menu_item, - SexyUrlLabel *url_label); - -static void sexy_url_label_clear_links(SexyUrlLabel *url_label); -static void
[Xfce4-commits] thunar:master Drop the button from the entry toolbar.
Updating branch refs/heads/master to e9ead973243a05d284f7db064430ff95b023f82d (commit) from e896587aceea32af7bb7bfab5a30e644087cd68d (commit) commit e9ead973243a05d284f7db064430ff95b023f82d Author: Nick Schermer n...@xfce.org Date: Sun May 27 10:42:21 2012 +0200 Drop the button from the entry toolbar. thunar/thunar-location-entry.c | 346 thunar/thunar-location-entry.h |2 - 2 files changed, 0 insertions(+), 348 deletions(-) diff --git a/thunar/thunar-location-entry.c b/thunar/thunar-location-entry.c index d64dbc0..4c27b87 100644 --- a/thunar/thunar-location-entry.c +++ b/thunar/thunar-location-entry.c @@ -76,10 +76,6 @@ static gbooleanthunar_location_entry_accept_focus (ThunarLocationBa static voidthunar_location_entry_activate (GtkWidget *path_entry, ThunarLocationEntry *location_entry); static gbooleanthunar_location_entry_reset (ThunarLocationEntry *location_entry); -static voidthunar_location_entry_button_clicked(GtkWidget *button, - ThunarLocationEntry *location_entry); -static voidthunar_location_entry_item_activated(GtkWidget *item, - ThunarLocationEntry *location_entry); @@ -184,34 +180,13 @@ thunar_location_entry_location_bar_init (ThunarLocationBarIface *iface) static void thunar_location_entry_init (ThunarLocationEntry *location_entry) { - GtkSizeGroup *size_group; - GtkWidget*button; - GtkWidget*arrow; - gtk_box_set_spacing (GTK_BOX (location_entry), 0); - gtk_container_set_border_width (GTK_CONTAINER (location_entry), 4); location_entry-path_entry = thunar_path_entry_new (); exo_binding_new (G_OBJECT (location_entry), current-directory, G_OBJECT (location_entry-path_entry), current-file); g_signal_connect_after (G_OBJECT (location_entry-path_entry), activate, G_CALLBACK (thunar_location_entry_activate), location_entry); gtk_box_pack_start (GTK_BOX (location_entry), location_entry-path_entry, TRUE, TRUE, 0); gtk_widget_show (location_entry-path_entry); - - button = gtk_toggle_button_new (); - g_signal_connect (G_OBJECT (button), clicked, G_CALLBACK (thunar_location_entry_button_clicked), location_entry); - g_signal_connect (G_OBJECT (button), pressed, G_CALLBACK (thunar_location_entry_button_clicked), location_entry); - gtk_box_pack_start (GTK_BOX (location_entry), button, FALSE, FALSE, 0); - gtk_widget_show (button); - - arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE); - gtk_container_add (GTK_CONTAINER (button), arrow); - gtk_widget_show (arrow); - - /* make sure the entry and the button request the same height */ - size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL); - gtk_size_group_add_widget (size_group, location_entry-path_entry); - gtk_size_group_add_widget (size_group, button); - g_object_unref (G_OBJECT (size_group)); } @@ -426,8 +401,6 @@ thunar_location_entry_poke_file_finish (ThunarBrowser *browser, - - static void thunar_location_entry_activate (GtkWidget *path_entry, ThunarLocationEntry *location_entry) @@ -459,322 +432,3 @@ thunar_location_entry_reset (ThunarLocationEntry *location_entry) return TRUE; } - - - -static void -menu_position (GtkMenu *menu, - gint *x, - gint *y, - gboolean *push_in, - gpointer entry) -{ - GtkRequisition entry_request; - GtkRequisition menu_request; - GdkRectangle geometry; - GdkScreen *screen; - GtkWidget *toplevel = gtk_widget_get_toplevel (entry); - gint monitor; - gint x0; - gint y0; - - gtk_widget_translate_coordinates (GTK_WIDGET (entry), toplevel, 0, 0, x0, y0); - - gtk_widget_size_request (GTK_WIDGET (entry), entry_request); - gtk_widget_size_request (GTK_WIDGET (menu), menu_request); - - gdk_window_get_position (GTK_WIDGET (entry)-window, x, y); - - *x += x0 + gtk_container_get_border_width (GTK_CONTAINER (entry)); - *y += y0 + (entry_request.height - gtk_container_get_border_width (GTK_CONTAINER (entry))); - - /* verify the the menu is on-screen */ - screen = gtk_widget_get_screen (GTK_WIDGET (entry)); - if (G_LIKELY (screen != NULL)) -{ - monitor = gdk_screen_get_monitor_at_point (screen, *x, *y); - gdk_screen_get_monitor_geometry (screen, monitor, geometry); - if (*y + menu_request.height geometry.y + geometry.height) -*y -= menu_request.height - entry_request.height; -} - - *push_in = TRUE; -} - - - -static void -thunar_location_entry_button_clicked (GtkWidget *button, -
[Xfce4-commits] thunar:nick/gseal+clean Deleting branch nick/gseal+clean
Deleting branch refs/heads/nick/gseal+clean ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Use a GtkSpinner instead of the ThunarThrobber.
Updating branch refs/heads/master to e896587aceea32af7bb7bfab5a30e644087cd68d (commit) from c1420216a140e6e87b9291f4a5dcc0223c4432e7 (commit) commit e896587aceea32af7bb7bfab5a30e644087cd68d Author: Nick Schermer n...@xfce.org Date: Fri May 25 20:18:19 2012 +0200 Use a GtkSpinner instead of the ThunarThrobber. This is a new widget since 2.20, so we can use it. In Gtk3 this widget also has a special rendering class in the theme engine. .gitignore |1 - po/POTFILES.in |1 - thunar/Makefile.am |9 - thunar/thunar-size-label.c | 39 ++-- thunar/thunar-throbber-fallback.h | 31 --- thunar/thunar-throbber-fallback.png | Bin 2713 - 0 bytes thunar/thunar-throbber.c| 371 --- thunar/thunar-throbber.h| 47 - thunar/thunar-window.c | 16 +- 9 files changed, 28 insertions(+), 487 deletions(-) diff --git a/.gitignore b/.gitignore index 245172f..51fb0b1 100644 --- a/.gitignore +++ b/.gitignore @@ -107,7 +107,6 @@ tests/data/.*.swp thunar/*.loT thunar/.*.swp thunar/thunar-fallback-icon.c -thunar/thunar-throbber-fallback.c thunar/thunar-thumbnail-frame.c thunar/thunar-thumbnailer-manager-proxy.h thunar/thunar-thumbnailer-proxy.h diff --git a/po/POTFILES.in b/po/POTFILES.in index 63e17af..751ba59 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -78,7 +78,6 @@ thunar/thunar-statusbar.c thunar/thunar-stock.c thunar/thunar-templates-action.c thunar/thunar-text-renderer.c -thunar/thunar-throbber.c thunar/thunar-thumbnail-cache.c thunar/thunar-thumbnailer.c thunar/thunar-transfer-job.c diff --git a/thunar/Makefile.am b/thunar/Makefile.am index 0f9c198..4065d87 100644 --- a/thunar/Makefile.am +++ b/thunar/Makefile.am @@ -195,10 +195,6 @@ thunar_SOURCES = \ thunar-templates-action.h \ thunar-text-renderer.c \ thunar-text-renderer.h \ - thunar-throbber.c \ - thunar-throbber.h \ - thunar-throbber-fallback.c \ - thunar-throbber-fallback.h \ thunar-thumbnail-cache.c\ thunar-thumbnail-cache.h\ thunar-thumbnailer.c\ @@ -318,7 +314,6 @@ DISTCLEANFILES += \ thunar-shortcuts-pane-ui.h \ thunar-renamer-dialog-ui.h \ thunar-standard-view-ui.h \ - thunar-throbber-fallback.c \ thunar-thumbnail-frame.c\ thunar-window-ui.h @@ -331,7 +326,6 @@ BUILT_SOURCES = \ thunar-shortcuts-pane-ui.h \ thunar-renamer-dialog-ui.h \ thunar-standard-view-ui.h \ - thunar-throbber-fallback.c \ thunar-thumbnail-frame.c\ thunar-window-ui.h @@ -356,9 +350,6 @@ thunar-thumbnail-cache-proxy.h: $(srcdir)/thunar-thumbnail-cache-dbus.xml Makefi ) endif -thunar-throbber-fallback.c: $(srcdir)/thunar-throbber-fallback.png Makefile - $(AM_V_GEN) (echo #include thunar/thunar-throbber-fallback.h gdk-pixbuf-csource --extern --raw --stream --name=thunar_throbber_fallback $(srcdir)/thunar-throbber-fallback.png) thunar-throbber-fallback.c - thunar-thumbnail-frame.c: $(srcdir)/thunar-thumbnail-frame.png Makefile $(AM_V_GEN) (echo #include thunar/thunar-thumbnail-frame.h gdk-pixbuf-csource --extern --raw --stream --name=thunar_thumbnail_frame $(srcdir)/thunar-thumbnail-frame.png) thunar-thumbnail-frame.c diff --git a/thunar/thunar-size-label.c b/thunar/thunar-size-label.c index 3f0c12b..679a256 100644 --- a/thunar/thunar-size-label.c +++ b/thunar/thunar-size-label.c @@ -33,7 +33,6 @@ #include thunar/thunar-gtk-extensions.h #include thunar/thunar-private.h #include thunar/thunar-size-label.h -#include thunar/thunar-throbber.h #include thunar/thunar-deep-count-job.h @@ -88,7 +87,7 @@ struct _ThunarSizeLabel GList *files; GtkWidget *label; - GtkWidget *throbber; + GtkWidget *spinner; }; @@ -132,17 +131,19 @@ thunar_size_label_init (ThunarSizeLabel *size_label) /*
[Xfce4-commits] thunar:master Use g_(s)list_free_full where possible.
Updating branch refs/heads/master to 853001496fd176d6a60fca9ca8709686dd0f67c1 (commit) from e9ead973243a05d284f7db064430ff95b023f82d (commit) commit 853001496fd176d6a60fca9ca8709686dd0f67c1 Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 18:32:05 2012 +0200 Use g_(s)list_free_full where possible. plugins/thunar-uca/thunar-uca-model.c| 11 +-- thunar/thunar-application.c |6 ++ thunar/thunar-chooser-model.c|7 ++- thunar/thunar-dbus-service.c |3 +-- thunar/thunar-file.c |6 ++ thunar/thunar-list-model.c |9 +++-- thunar/thunar-permissions-chooser.c |3 +-- thunar/thunar-properties-dialog.c|3 +-- thunar/thunar-renamer-dialog.c |6 ++ thunar/thunar-renamer-model.c|9 + thunar/thunar-renamer-pair.c |8 thunar/thunar-renamer-pair.h |2 +- thunar/thunar-sendto-model.c |9 +++-- thunar/thunar-shortcuts-model.c |3 +-- thunar/thunar-standard-view.c| 21 +++-- thunar/thunar-templates-action.c |3 +-- thunar/thunar-thumbnail-cache.c | 23 +++ thunar/thunar-transfer-job.c |8 thunar/thunar-tree-model.c |6 ++ thunar/thunar-user.c |6 ++ thunar/thunar-window.c |3 +-- thunarx/thunarx-file-info.c |8 ++-- thunarx/thunarx-menu-provider.c |9 +++-- thunarx/thunarx-preferences-provider.c |3 +-- thunarx/thunarx-property-page-provider.c |3 +-- thunarx/thunarx-provider-factory.c |3 +-- thunarx/thunarx-renamer-provider.c |3 +-- thunarx/thunarx-renamer.c|3 +-- 28 files changed, 67 insertions(+), 120 deletions(-) diff --git a/plugins/thunar-uca/thunar-uca-model.c b/plugins/thunar-uca/thunar-uca-model.c index 59c1d03..aa388b0 100644 --- a/plugins/thunar-uca/thunar-uca-model.c +++ b/plugins/thunar-uca/thunar-uca-model.c @@ -122,7 +122,7 @@ static gboolean thunar_uca_model_load_from_file (ThunarUcaModel const gchar *filename, GError **error); static void thunar_uca_model_item_reset (ThunarUcaModelItem *item); -static void thunar_uca_model_item_free (ThunarUcaModelItem *item); +static void thunar_uca_model_item_free(gpointer data); static void start_element_handler (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, @@ -284,8 +284,7 @@ thunar_uca_model_finalize (GObject *object) g_object_unref (G_OBJECT (uca_model-icon_factory)); /* release all items */ - g_list_foreach (uca_model-items, (GFunc) thunar_uca_model_item_free, NULL); - g_list_free (uca_model-items); + g_list_free_full (uca_model-items, thunar_uca_model_item_free); (*G_OBJECT_CLASS (thunar_uca_model_parent_class)-finalize) (object); } @@ -600,8 +599,9 @@ thunar_uca_model_item_reset (ThunarUcaModelItem *item) static void -thunar_uca_model_item_free (ThunarUcaModelItem *item) +thunar_uca_model_item_free (gpointer data) { + ThunarUcaModelItem *item = data; thunar_uca_model_item_reset (item); g_free (item); } @@ -1000,8 +1000,7 @@ types_from_mime_type (const gchar *mime_type) * * The caller is responsible to free the returned list using * informalexampleprogramlisting - * g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL); - * g_list_free (list); + * g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free); * /programlisting/informalexample * * Return value: the list of #GtkTreePath!s to items diff --git a/thunar/thunar-application.c b/thunar/thunar-application.c index 31ad89e..b619bbe 100644 --- a/thunar/thunar-application.c +++ b/thunar/thunar-application.c @@ -268,8 +268,7 @@ thunar_application_finalize (GObject *object) g_source_remove (application-volman_idle_id); /* drop all pending volume manager UDIs */ - g_slist_foreach (application-volman_udis, (GFunc) g_free, NULL); - g_slist_free (application-volman_udis); + g_slist_free_full (application-volman_udis, g_free); /* disconnect from the udev client */ g_object_unref (application-udev_client); @@ -659,8 +658,7 @@ thunar_application_volman_idle (gpointer user_data) else { /* drop all pending HAL device UDIs */ - g_slist_foreach (application-volman_udis, (GFunc) g_free, NULL); - g_slist_free (application-volman_udis); +
[Xfce4-commits] forum:master Update bad behaviour to 2.2.10.
Updating branch refs/heads/master to 7b516abdbe10cfe29fdd63113b9c686dfed31700 (commit) from cef9d8c7f70dbe6c65f2c02133ed5b88c4844569 (commit) commit 7b516abdbe10cfe29fdd63113b9c686dfed31700 Author: Nick Schermer n...@xfce.org Date: Sun Sep 16 20:31:11 2012 +0200 Update bad behaviour to 2.2.10. include/bad-behavior/banned.inc.php |2 + include/bad-behavior/blacklist.inc.php| 58 - include/bad-behavior/core.inc.php |2 +- include/bad-behavior/responses.inc.php|1 + include/bad-behavior/searchengine.inc.php |2 +- 5 files changed, 61 insertions(+), 4 deletions(-) diff --git a/include/bad-behavior/banned.inc.php b/include/bad-behavior/banned.inc.php index 476a366..29ce774 100644 --- a/include/bad-behavior/banned.inc.php +++ b/include/bad-behavior/banned.inc.php @@ -7,6 +7,8 @@ require_once(BB2_CORE . /responses.inc.php); function bb2_housekeeping($settings, $package) { + if (!$settings['logging']) return; + // FIXME Yes, the interval's hard coded (again) for now. $query = DELETE FROM ` . $settings['log_table'] . ` WHERE `date` DATE_SUB(' . bb2_db_date() . ', INTERVAL 7 DAY); bb2_db_query($query); diff --git a/include/bad-behavior/blacklist.inc.php b/include/bad-behavior/blacklist.inc.php index 36bc4c5..ba4554e 100644 --- a/include/bad-behavior/blacklist.inc.php +++ b/include/bad-behavior/blacklist.inc.php @@ -5,11 +5,11 @@ function bb2_blacklist($package) { // Blacklisted user agents // These user agent strings occur at the beginning of the line. $bb2_spambots_0 = array( - sc, // XSS exploit attempts 8484 Boston Project, // video poker/porn spam adwords, // referrer spam autoemailspider, // spam harvester blogsearchbot-martin, // from honeypot + BrowserEmulator/, // open proxy software CherryPicker, // spam harvester core-project/,// FrontPage extension exploits Diamond, // delivers spyware/adware @@ -28,15 +28,21 @@ function bb2_blacklist($package) { Java/1., // unidentified robots libwww-perl, // unidentified robots LWP, // unidentified robots + lwp, // unidentified robots + Microsoft Internet Explorer/, // too old; assumed robot Microsoft URL,// unidentified robots Missigua, // spam harvester MJ12bot/v1.0.8, // malicious botnet Movable Type, // customised spambots Mozilla , // malicious software + Mozilla/0,// malicious software + Mozilla/1,// malicious software Mozilla/2,// malicious software + Mozilla/3,// malicious software Mozilla/4.0(, // from honeypot Mozilla/4.0+(compatible;+,// suspicious harvester MSIE, // malicious software + MVAClient,// automated hacking attempts NutchCVS, // unidentified robots Nutscrape/, // misc comment spam OmniExplorer, // spam harvester @@ -61,6 +67,7 @@ function bb2_blacklist($package) { // These user agent strings occur anywhere within the line. $bb2_spambots = array( \r, // A really dumb bot + sc, // XSS exploit attempts ; Widows ,// misc comment/email spam a href=, // referrer spam Bad Behavior Test,// Add this to your user-agent to test BB @@ -68,13 +75,17 @@ function bb2_blacklist($package) { compatible-, // misc comment/email spam DTS Agent,// misc comment/email spam Email Extractor, // spam harvester + Firebird/,// too old; assumed robot Gecko/25, // revisit this in 500 years grub-client, // search engine ignores robots.txt hanzoweb, // very badly behaved crawler + Havij,// SQL injection tool Indy Library, // misc comment/email spam MSIE 7.0; Windows NT 5.2,// Cyveillance Murzillo compatible, // comment spam bot .NET CLR 1), // free poker, etc. + .NET CLR1,// spam harvester + Perman Surfer,// old and very broken harvester POE-Component-Client, // free poker,