Update to release 3.3.90

This commit is contained in:
David Zeuthen 2012-01-20 17:28:44 -05:00
parent d625ccd3cb
commit d4701e4298
7 changed files with 28 additions and 575 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ gnome-disk-utility-2.30.1.tar.bz2
/gnome-disk-utility-2.91.7.tar.bz2
/gnome-disk-utility-3.0.0.tar.bz2
/gnome-disk-utility-3.0.2.tar.bz2
/gnome-disk-utility-3.3.90.tar.xz

View File

@ -1,12 +0,0 @@
diff -up gnome-disk-utility-2.91.6/src/nautilus-extension/Makefile.am.nautilus gnome-disk-utility-2.91.6/src/nautilus-extension/Makefile.am
--- gnome-disk-utility-2.91.6/src/nautilus-extension/Makefile.am.nautilus 2011-02-02 17:43:10.408424958 -0500
+++ gnome-disk-utility-2.91.6/src/nautilus-extension/Makefile.am 2011-02-02 17:43:22.123278502 -0500
@@ -34,7 +34,7 @@ CORE_LIBADD = \
$(NULL)
-nautilus_extensiondir = $(libdir)/nautilus/extensions-2.0
+nautilus_extensiondir = $(libdir)/nautilus/extensions-3.0
nautilus_extension_LTLIBRARIES = libnautilus-gdu.la
libnautilus_gdu_la_SOURCES = \

View File

@ -1,24 +0,0 @@
From 598b83ff6ce9d18090b84032a028a0115eb0cdff Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Mon, 18 Jan 2010 17:30:27 +0100
Subject: [PATCH] Install missing include
---
src/gdu/Makefile.am | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/gdu/Makefile.am b/src/gdu/Makefile.am
index d9dcbb1..89fec7a 100644
--- a/src/gdu/Makefile.am
+++ b/src/gdu/Makefile.am
@@ -44,6 +44,7 @@ libgduinclude_HEADERS = \
gdu-drive.h \
gdu-linux-md-drive.h \
gdu-linux-lvm2-volume-group.h \
+ gdu-linux-lvm2-volume-hole.h \
gdu-linux-lvm2-volume.h \
gdu-error.h \
gdu-known-filesystem.h \
--
1.6.6

View File

@ -1,113 +1,39 @@
%define dbus_version 1.2
%define dbus_glib_version 0.76
%define glib2_version 2.16
%define gtk3_version 2.99
%define gnome_doc_utils_version 0.3.2
%define gnome_keyring_version 2.22
%define udisks_version 1.0.3
%define unique_version 1.0.4
%define libnotify_version 0.7.0
%define nautilus_version 2.26
%define libatasmart_version 0.14
%define glib2_version 2.31.0
%define gtk3_version 3.3.0
%define udisks_version 1.90.0
Summary: Disk management application
Summary: Disks
Name: gnome-disk-utility
Version: 3.0.2
Release: 5%{?dist}
Version: 3.3.90
Release: 1%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://git.gnome.org/cgit/gnome-disk-utility
Source0: http://download.gnome.org/sources/gnome-disk-utility/3.0/%{name}-%{version}.tar.bz2
URL: http://git.gnome.org/browse/gnome-disk-utility
Source0: http://download.gnome.org/sources/gnome-disk-utility/3.3/%{name}-%{version}.tar.xz
BuildRequires: dbus-devel >= %{dbus_version}
BuildRequires: dbus-glib-devel >= %{dbus_glib_version}
BuildRequires: dbus-glib >= %{dbus_glib_version}
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gtk3-devel >= %{gtk3_version}
BuildRequires: gnome-doc-utils >= %{gnome_doc_utils_version}
BuildRequires: gettext
BuildRequires: desktop-file-utils
BuildRequires: gnome-keyring-devel >= %{gnome_keyring_version}
BuildRequires: udisks-devel >= %{udisks_version}
BuildRequires: unique3-devel >= %{unique_version}
BuildRequires: libnotify-devel >= %{libnotify_version}
BuildRequires: nautilus-devel >= %{nautilus_version}
BuildRequires: libatasmart-devel >= %{libatasmart_version}
BuildRequires: avahi-ui-devel
BuildRequires: intltool
BuildRequires: rarian-compat
BuildRequires: automake autoconf libtool
BuildRequires: libudisks2-devel >= %{udisks_version}
BuildRequires: gnome-common
BuildRequires: gtk-doc
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: gnome-disk-utility-format
Obsoletes: nautilus-gdu
Obsoletes: gnome-disk-utility-libs
Obsoletes: gnome-disk-utility-devel
Obsoletes: gnome-disk-utility-ui-libs
Obsoletes: gnome-disk-utility-ui-devel
Obsoletes: gnome-disk-utility-nautilus
%description
This package contains the Palimpsest disk management application.
Palimpsest supports partitioning, file system creation, encryption,
RAID, SMART monitoring, etc.
%package libs
Summary: Shared libraries used by Palimpsest
Group: Development/Libraries
Requires: udisks >= %{udisks_version}
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%description libs
This package contains libraries that are used by the Palimpsest
disk management application. The libraries in this package do not
contain UI-related code.
%package ui-libs
Summary: Shared libraries used by Palimpsest
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%description ui-libs
This package contains libraries that are used by the Palimpsest
disk management application. The libraries in this package contain
disk-related widgets for use in GTK+ applications.
%package devel
Summary: Development files for gnome-disk-utility-libs
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
%description devel
This package contains header files and libraries needed to
develop applications with gnome-disk-utility-libs.
%package ui-devel
Summary: Development files for gnome-disk-utility-ui-libs
Group: Development/Libraries
Requires: %{name}-ui-libs = %{version}-%{release}
Requires: %{name}-devel = %{version}-%{release}
%description ui-devel
This package contains header files and libraries needed to
develop applications with gnome-disk-utility-ui-libs.
%package nautilus
Summary: Nautilus extension
Group: Applications/File
Obsoletes: %{name} < 2.91.6-5
Requires: %{name} = %{version}-%{release}
%description nautilus
This package contains a Nautilus extension providing formatting
functionality.
This package contains the Disks application. Disks supports
partitioning, file system creation, encryption, fstab/crypttab
editing, ATA SMART and other features
%prep
%setup -q
aclocal
automake
%build
%configure
make %{?_smp_mflags}
@ -115,107 +41,42 @@ make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
# TODO: upstream doesn't ship a HACKING file yet
echo " " > HACKING
desktop-file-install --delete-original \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT%{_datadir}/applications/palimpsest.desktop
desktop-file-install --delete-original \
--dir $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart \
$RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/gdu-notification-daemon.desktop
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-3.0/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-3.0/*.a
%find_lang %{name}
%post
touch --no-create %{_datadir}/icons/hicolor || :
update-desktop-database %{_datadir}/applications &> /dev/null
%postun
update-desktop-database %{_datadir}/applications &> /dev/null
%post libs
touch --no-create %{_datadir}/icons/hicolor || :
/sbin/ldconfig
%postun libs
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
/sbin/ldconfig
%posttrans libs
%posttrans
gtk-update-icon-cache -q %{_datadir}/icons/hicolor || :
%post ui-libs -p /sbin/ldconfig
%postun ui-libs -p /sbin/ldconfig
%files
%files -f %{name}.lang
%defattr(-,root,root,-)
%{_libexecdir}/gdu-notification-daemon
%{_sysconfdir}/xdg/autostart/gdu-notification-daemon.desktop
%{_libexecdir}/gdu-format-tool
%{_bindir}/palimpsest
%{_datadir}/applications/palimpsest.desktop
%dir %{_datadir}/gnome/help/palimpsest
%{_datadir}/gnome/help/palimpsest/*
%{_datadir}/gnome-disk-utility/*.ui
%{_datadir}/icons/hicolor/*
%dir %{_datadir}/omf/palimpsest
%{_datadir}/omf/palimpsest/*
%files libs -f %{name}.lang
%defattr(-,root,root,-)
%doc README AUTHORS NEWS COPYING HACKING TODO
%{_libdir}/libgdu.so.*
# Yes, it's a bit weird to include icons in the non-UI package but the
# library returns references to these icons
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/icons/hicolor/scalable/apps/*.svg
%files ui-libs
%defattr(-,root,root,-)
%{_libdir}/libgdu-gtk.so.*
%files devel
%defattr(-,root,root,-)
%{_libdir}/libgdu.so
%{_libdir}/pkgconfig/gdu.pc
%dir %{_includedir}/gnome-disk-utility
%dir %{_includedir}/gnome-disk-utility/gdu
%{_includedir}/gnome-disk-utility/gdu/*
%files ui-devel
%defattr(-,root,root,-)
%{_libdir}/libgdu-gtk.so
%{_libdir}/pkgconfig/gdu-gtk.pc
%dir %{_includedir}/gnome-disk-utility/gdu-gtk
%{_includedir}/gnome-disk-utility/gdu-gtk/*
%files nautilus
%defattr(-,root,root,-)
%{_libdir}/nautilus/extensions-3.0/*.so
%doc README AUTHORS NEWS COPYING
%changelog
* Fri Jan 20 2012 David Zeuthen <davidz@redhat.com> - 3.3.90-1%{?dist}
- Update to release 3.3.90
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

View File

@ -1,327 +0,0 @@
diff -up gnome-disk-utility-2.32.0/src/notification/notification-main.c.no-statusicon gnome-disk-utility-2.32.0/src/notification/notification-main.c
--- gnome-disk-utility-2.32.0/src/notification/notification-main.c.no-statusicon 2010-08-05 13:03:58.000000000 -0400
+++ gnome-disk-utility-2.32.0/src/notification/notification-main.c 2010-11-05 11:39:30.723300002 -0400
@@ -39,16 +39,12 @@ typedef struct
{
GduPool *pool;
- GtkStatusIcon *status_icon;
-
/* List of GduDevice objects currently being unmounted */
GList *devices_being_unmounted;
/* List of GduDevice objects with ATA SMART failures */
GList *ata_smart_failures;
- gboolean show_icon_for_ata_smart_failures;
-
NotifyNotification *ata_smart_notification;
GFileMonitor *ata_smart_ignore_monitor;
@@ -69,9 +65,7 @@ static void update_unmount_dialogs (Noti
static void update_ata_smart_failures (NotificationData *data);
-static void update_status_icon (NotificationData *data);
-
-static void show_menu_for_status_icon (NotificationData *data);
+static void update_notification (NotificationData *data);
/* ---------------------------------------------------------------------------------------------------- */
@@ -119,24 +113,6 @@ on_device_job_changed (GduPool *pool,
}
static void
-on_status_icon_activate (GtkStatusIcon *status_icon,
- gpointer user_data)
-{
- NotificationData *data = user_data;
- show_menu_for_status_icon (data);
-}
-
-static void
-on_status_icon_popup_menu (GtkStatusIcon *status_icon,
- guint button,
- guint activate_time,
- gpointer user_data)
-{
- NotificationData *data = user_data;
- show_menu_for_status_icon (data);
-}
-
-static void
on_ata_smart_ignore_monitor_changed (GFileMonitor *monitor,
GFile *file,
GFile *other_file,
@@ -164,13 +140,6 @@ notification_data_new (void)
g_signal_connect (data->pool, "device-changed", G_CALLBACK (on_device_changed), data);
g_signal_connect (data->pool, "device-job-changed", G_CALLBACK (on_device_job_changed), data);
- data->status_icon = gtk_status_icon_new ();
- gtk_status_icon_set_visible (data->status_icon, FALSE);
- gtk_status_icon_set_from_icon_name (data->status_icon, "gdu-warning");
- gtk_status_icon_set_tooltip_markup (data->status_icon, _("One or more disks are failing"));
- g_signal_connect (data->status_icon, "activate", G_CALLBACK (on_status_icon_activate), data);
- g_signal_connect (data->status_icon, "popup-menu", G_CALLBACK (on_status_icon_popup_menu), data);
-
dir_path = g_build_filename (g_get_user_config_dir (),
"gnome-disk-utility",
"ata-smart-ignore",
@@ -208,10 +177,6 @@ notification_data_new (void)
static void
notification_data_free (NotificationData *data)
{
- g_signal_handlers_disconnect_by_func (data->status_icon, on_status_icon_activate, data);
- g_signal_handlers_disconnect_by_func (data->status_icon, on_status_icon_popup_menu, data);
- g_object_unref (data->status_icon);
-
g_signal_handlers_disconnect_by_func (data->pool, on_device_added, data);
g_signal_handlers_disconnect_by_func (data->pool, on_device_removed, data);
g_signal_handlers_disconnect_by_func (data->pool, on_device_changed, data);
@@ -478,197 +443,75 @@ update_ata_smart_failures (NotificationD
g_list_foreach (devices, (GFunc) g_object_unref, NULL);
g_list_free (devices);
- update_status_icon (data);
+ update_notification (data);
}
/* ---------------------------------------------------------------------------------------------------- */
-static gboolean
-show_notification (NotificationData *data)
+static void
+on_examine_action_clicked (NotifyNotification *notification,
+ char *action,
+ NotificationData *data)
{
- static int count = 0;
-
- /* wait for the panel to be settled before showing a bubble */
- if (gtk_status_icon_is_embedded (data->status_icon)) {
- notify_notification_show (data->ata_smart_notification, NULL);
- } else if (count < 20) {
- count++;
- g_timeout_add_seconds (1, (GSourceFunc) show_notification, data);
- } else {
- g_warning ("No notification area. Notification bubbles will not be displayed.");
- }
- return FALSE;
+ g_spawn_command_line_async ("palimpsest", NULL);
}
static void
-update_status_icon (NotificationData *data)
+update_notification (NotificationData *data)
{
- gboolean show_icon;
- gboolean old_show_icon_for_ata_smart_failures;
+ int num_drives;
- old_show_icon_for_ata_smart_failures = data->show_icon_for_ata_smart_failures;
-
- data->show_icon_for_ata_smart_failures = FALSE;
- if (g_list_length (data->ata_smart_failures) > 0)
- data->show_icon_for_ata_smart_failures = TRUE;
-
- show_icon = data->show_icon_for_ata_smart_failures;
-
- if (!show_icon) {
+ if (data->ata_smart_failures == NULL) {
if (data->ata_smart_notification != NULL) {
notify_notification_close (data->ata_smart_notification, NULL);
g_object_unref (data->ata_smart_notification);
data->ata_smart_notification = NULL;
}
- gtk_status_icon_set_visible (data->status_icon, FALSE);
goto out;
}
- gtk_status_icon_set_visible (data->status_icon, TRUE);
-
- /* we've started showing the icon for ATA RAID failures; pop up a libnotify notification */
- if (old_show_icon_for_ata_smart_failures != data->show_icon_for_ata_smart_failures) {
+ num_drives = g_list_length (data->ata_smart_failures);
+ if (data->ata_smart_notification == NULL) {
+ data->ata_smart_notification = notify_notification_new (
+ /* Translators: This is used as the title of the notification */
+ _("Hard Disk Problems Detected"),
+ /* Translators: This is used as the text of the notification*/
+ g_dngettext (GETTEXT_PACKAGE,
+ N_("A hard disk is reporting health problems."),
+ N_("Multiple system hard disks are reporting health problems."),
+ num_drives),
+ "gdu-warning");
- data->ata_smart_notification = notify_notification_new (
- /* Translators: This is used as the title of the notification */
- _("A hard disk may be failing"),
- /* Translators: This is used as the text of the notification*/
- _("One or more hard disks report health problems. Click the icon to get more information."),
- "gtk-dialog-warning",
- NULL);
- notify_notification_attach_to_status_icon (data->ata_smart_notification,
- data->status_icon);
notify_notification_set_urgency (data->ata_smart_notification, NOTIFY_URGENCY_CRITICAL);
notify_notification_set_timeout (data->ata_smart_notification, NOTIFY_EXPIRES_NEVER);
- show_notification (data);
+ notify_notification_add_action (data->ata_smart_notification,
+ "examine",
+ _("Examine"),
+ (NotifyActionCallback) on_examine_action_clicked,
+ data,
+ NULL);
+ } else {
+ notify_notification_update (data->ata_smart_notification,
+ /* Translators: This is used as the title of the notification */
+ _("Hard Disk Problems Detected"),
+ /* Translators: This is used as the text of the notification*/
+ g_dngettext (GETTEXT_PACKAGE,
+ N_("A hard disk is reporting health problems."),
+ N_("Multiple hard disks are reporting health problems."),
+ num_drives),
+ "gdu-warning");
+
}
+ notify_notification_show (data->ata_smart_notification, NULL);
+
out:
;
}
/* ---------------------------------------------------------------------------------------------------- */
-static void
-on_menu_item_activated (GtkMenuItem *menu_item,
- gpointer user_data)
-{
- NotificationData *data = user_data;
- GduDevice *device;
- GdkScreen *screen;
- gchar *command_line;
-
- device = GDU_DEVICE (g_object_get_data (G_OBJECT (menu_item), "gdu-device"));
-
- screen = gtk_status_icon_get_screen (data->status_icon);
- command_line = g_strdup_printf ("palimpsest --show-drive=%s", gdu_device_get_device_file (device));
- gdk_spawn_command_line_on_screen (screen, command_line, NULL);
- g_free (command_line);
-}
-
-static void
-show_menu_for_status_icon (NotificationData *data)
-{
- GtkWidget *menu;
- GList *l;
-
- /* remove notifications when the user clicks the icon */
- if (data->ata_smart_notification != NULL) {
- notify_notification_close (data->ata_smart_notification, NULL);
- g_object_unref (data->ata_smart_notification);
- data->ata_smart_notification = NULL;
- }
-
- /* TODO: it would be nice to display something like
- *
- * Select a disk to get more information...
- * -----------------------------------------------
- * [Icon] 80 GB ATA INTEL SSDSA2MH08
- * [Icon] 250GB WD 2500JB External
- *
- * but unfortunately that would require fucking with gtk+'s
- * internals the same way the display-settings applet does
- * it; see e.g. line 951 of
- *
- * http://svn.gnome.org/viewvc/gnome-settings-daemon/trunk/plugins/xrandr/gsd-xrandr-manager.c?revision=810&view=markup
- */
-
- /* TODO: Perhaps it would also be nice to have a "Preferences..." menu item such
- * that the user can turn off notifications on a per-device basis.
- */
-
- menu = gtk_menu_new ();
- for (l = data->ata_smart_failures; l != NULL; l = l->next) {
- GduDevice *device = GDU_DEVICE (l->data);
- GduPresentable *presentable;
- gchar *name;
- gchar *vpd_name;
- const gchar *status;
- gchar *status_desc;
- gboolean highlight;
- GdkPixbuf *pixbuf;
- GtkWidget *image;
- GtkWidget *menu_item;
- gchar *s;
-
- presentable = gdu_pool_get_drive_by_device (data->pool, device);
- name = gdu_presentable_get_name (presentable);
- vpd_name = gdu_presentable_get_vpd_name (presentable);
-
- status = gdu_device_drive_ata_smart_get_status (device);
- status_desc = gdu_util_ata_smart_status_to_desc (status, &highlight, NULL, NULL);
-
- if (highlight) {
- s = g_strdup_printf ("<span fgcolor=\"red\"><b>%s</b></span>", status_desc);
- g_free (status_desc);
- status_desc = s;
- }
-
- s = g_strdup_printf ("<b>%s</b> %s\n"
- "<small>%s</small>",
- name,
- vpd_name,
- status_desc);
-
- menu_item = gtk_image_menu_item_new_with_label (s);
- gtk_label_set_use_markup (GTK_LABEL (gtk_bin_get_child (GTK_BIN (menu_item))), TRUE);
- gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (menu_item), TRUE);
-
- g_object_set_data_full (G_OBJECT (menu_item), "gdu-device", g_object_ref (device), g_object_unref);
-
- pixbuf = gdu_util_get_pixbuf_for_presentable (presentable, GTK_ICON_SIZE_SMALL_TOOLBAR);
- image = gtk_image_new_from_pixbuf (pixbuf);
- g_object_unref (pixbuf);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
-
- g_signal_connect (menu_item,
- "activate",
- G_CALLBACK (on_menu_item_activated),
- data);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
-
- g_free (name);
- g_free (vpd_name);
- g_free (status_desc);
- g_free (s);
- g_object_unref (presentable);
- }
- gtk_widget_show_all (menu);
-
- gtk_menu_popup (GTK_MENU (menu),
- NULL,
- NULL,
- gtk_status_icon_position_menu,
- data->status_icon,
- 0,
- gtk_get_current_event_time ());
-
-}
-
-/* ---------------------------------------------------------------------------------------------------- */
-
int
main (int argc, char **argv)
{
@@ -693,7 +536,7 @@ main (int argc, char **argv)
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
- notify_init ("gdu-notification-daemon");
+ notify_init (_("Disk Utility"));
gtk_window_set_default_icon_name ("palimpsest");

View File

@ -1,46 +0,0 @@
--- gnome-disk-utility-2.32.0/src/gdu-gtk/gdu-volume-grid.c 2010-09-15 10:12:21.000000000 -0400
+++ gnome-disk-utility-2.32.0.no-xkb/src/gdu-gtk/gdu-volume-grid.c 2010-11-03 16:40:37.544241996 -0400
@@ -25,7 +25,6 @@
#include <math.h>
#include <gdk/gdkkeysyms.h>
#include <gdk/gdkx.h>
-#include <X11/XKBlib.h>
#include <gdu-gtk/gdu-gtk.h>
@@ -259,26 +258,6 @@
}
static gboolean
-is_ctrl_pressed (void)
-{
- gboolean ret;
- XkbStateRec state;
- Bool status;
-
- ret = FALSE;
-
- gdk_error_trap_push ();
- status = XkbGetState (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), XkbUseCoreKbd, &state);
- gdk_error_trap_pop ();
-
- if (status == Success) {
- ret = ((state.mods & ControlMask) != 0);
- }
-
- return ret;
-}
-
-static gboolean
gdu_volume_grid_key_press_event (GtkWidget *widget,
GdkEventKey *event)
{
@@ -332,7 +311,7 @@
}
if (target != NULL) {
- if (is_ctrl_pressed ()) {
+ if ((event->state & GDK_CONTROL_MASK) != 0) {
grid->priv->focused = target;
} else {
grid->priv->selected = target;

View File

@ -1 +1 @@
2a4b9c005677a62a519b8197e6bba02f gnome-disk-utility-3.0.2.tar.bz2
b8a0a15d9cd40f9b05fc0e801d70be89 gnome-disk-utility-3.3.90.tar.xz