[Goodies-commits] r6556 - in sion/trunk: . po src
Enrico Troeger
enrico at xfce.org
Sun Jan 25 23:12:17 CET 2009
Author: enrico
Date: 2009-01-25 22:12:17 +0000 (Sun, 25 Jan 2009)
New Revision: 6556
Added:
sion/trunk/src/mountdialog.c
sion/trunk/src/mountdialog.h
Modified:
sion/trunk/ChangeLog
sion/trunk/TODO
sion/trunk/po/POTFILES.in
sion/trunk/src/Makefile.am
sion/trunk/src/backendgvfs.c
sion/trunk/src/backendgvfs.h
sion/trunk/src/bookmarkeditdialog.c
sion/trunk/src/common.c
sion/trunk/src/common.h
sion/trunk/src/main.c
sion/trunk/src/preferencesdialog.c
sion/trunk/src/window.c
sion/trunk/src/window.h
sion/trunk/wscript
Log:
Show a progressbar dialog when mounting bookmarks.
Move sion_get_application_icon_name() to common.c.
Some minor cleanups.
Modified: sion/trunk/ChangeLog
===================================================================
--- sion/trunk/ChangeLog 2009-01-25 22:11:56 UTC (rev 6555)
+++ sion/trunk/ChangeLog 2009-01-25 22:12:17 UTC (rev 6556)
@@ -7,6 +7,13 @@
tells to not support it (GVfs bug #538461).
* README, sion.1.in, src/main.c, src/window.c:
Fix spelling of GVfs.
+ * po/POTFILES.in, src/Makefile.am, src/backendgvfs.c,
+ src/backendgvfs.h, src/common.c, src/common.h,
+ src/mountdialog.c, src/mountdialog.h, src/preferencesdialog.c,
+ src/window.c, src/window.h:
+ Show a progressbar dialog when mounting bookmarks.
+ Move sion_get_application_icon_name() to common.c.
+ Some minor cleanups.
2009-01-19 Enrico Tröger <enrico(at)xfce(dot)org>
Modified: sion/trunk/TODO
===================================================================
--- sion/trunk/TODO 2009-01-25 22:11:56 UTC (rev 6555)
+++ sion/trunk/TODO 2009-01-25 22:12:17 UTC (rev 6556)
@@ -1,4 +1,2 @@
- better program icon
- libnotify - to notify about new mounts or disappeared mounts (ftp timeout, etc.)
-- progressdialog when mounting
-- allow usernames which include a '@' char
Modified: sion/trunk/po/POTFILES.in
===================================================================
--- sion/trunk/po/POTFILES.in 2009-01-25 22:11:56 UTC (rev 6555)
+++ sion/trunk/po/POTFILES.in 2009-01-25 22:12:17 UTC (rev 6556)
@@ -12,4 +12,5 @@
src/bookmarkeditdialog.c
src/preferencesdialog.c
src/backendgvfs.c
+src/mountdialog.c
sion.desktop.in
Modified: sion/trunk/src/Makefile.am
===================================================================
--- sion/trunk/src/Makefile.am 2009-01-25 22:11:56 UTC (rev 6555)
+++ sion/trunk/src/Makefile.am 2009-01-25 22:12:17 UTC (rev 6556)
@@ -10,6 +10,7 @@
settings.c settings.h \
backendgvfs.c backendgvfs.h \
menubuttonaction.c menubuttonaction.h \
+ mountdialog.c mountdialog.h \
passworddialog.c passworddialog.h \
bookmarkdialog.c bookmarkdialog.h \
bookmarkeditdialog.c bookmarkeditdialog.h \
Modified: sion/trunk/src/backendgvfs.c
===================================================================
--- sion/trunk/src/backendgvfs.c 2009-01-25 22:11:56 UTC (rev 6555)
+++ sion/trunk/src/backendgvfs.c 2009-01-25 22:12:17 UTC (rev 6556)
@@ -48,6 +48,11 @@
};
static guint signals[LAST_SIGNAL];
+typedef struct
+{
+ SionBackendGVFS *self;
+ GtkWidget *dialog;
+} MountInfo;
struct _SionBackendGVFSPrivate
{
@@ -448,7 +453,7 @@
}
-static void mount_ready_cb(GFile *location, GAsyncResult *res, gpointer backend)
+static void mount_ready_cb(GFile *location, GAsyncResult *res, MountInfo *mi)
{
gchar *uri;
gboolean success;
@@ -460,14 +465,18 @@
if (error != NULL && ! g_error_matches(error, G_IO_ERROR, G_IO_ERROR_ALREADY_MOUNTED))
{
gchar *msg = g_strdup_printf(_("Mounting of \"%s\" failed."), uri);
- g_signal_emit(backend, signals[OPERATION_FAILED], 0, msg, error->message);
+ g_signal_emit(mi->self, signals[OPERATION_FAILED], 0, msg, error->message);
g_free(msg);
}
if (error != NULL)
g_error_free(error);
+ if (mi->dialog != NULL)
+ gtk_widget_destroy(mi->dialog);
+
g_free(uri);
+ g_free(mi);
}
@@ -511,21 +520,26 @@
}
-void sion_backend_gvfs_mount_uri(SionBackendGVFS *backend, const gchar *uri, const gchar *domain)
+void sion_backend_gvfs_mount_uri(SionBackendGVFS *backend, const gchar *uri,
+ const gchar *domain, GtkWidget *dialog)
{
GMountOperation *op;
GFile *file;
+ MountInfo *mi;
g_return_if_fail(uri != NULL);
g_return_if_fail(backend != NULL);
op = g_mount_operation_new();
file = g_file_new_for_uri(uri);
+ mi = g_new0(MountInfo, 1);
+ mi->self = backend;
+ mi->dialog = dialog;
g_signal_connect(op, "ask-password", G_CALLBACK(set_password_cb), (gchar*) domain);
g_file_mount_enclosing_volume(file, G_MOUNT_MOUNT_NONE, op, NULL,
- (GAsyncReadyCallback) mount_ready_cb, backend);
+ (GAsyncReadyCallback) mount_ready_cb, mi);
g_object_unref(file);
}
Modified: sion/trunk/src/backendgvfs.h
===================================================================
--- sion/trunk/src/backendgvfs.h 2009-01-25 22:11:56 UTC (rev 6555)
+++ sion/trunk/src/backendgvfs.h 2009-01-25 22:12:17 UTC (rev 6556)
@@ -56,7 +56,10 @@
gboolean sion_backend_gvfs_mount_volume (SionBackendGVFS *backend, GVolume *vol);
void sion_backend_gvfs_unmount_mount (SionBackendGVFS *backend, GMount *mount);
-void sion_backend_gvfs_mount_uri (SionBackendGVFS *backend, const gchar *uri, const gchar *domain);
+void sion_backend_gvfs_mount_uri (SionBackendGVFS *backend,
+ const gchar *uri,
+ const gchar *domain,
+ GtkWidget *dialog);
gchar* sion_backend_gvfs_get_volume_identifier (GVolume *volume);
Modified: sion/trunk/src/bookmarkeditdialog.c
===================================================================
--- sion/trunk/src/bookmarkeditdialog.c 2009-01-25 22:11:56 UTC (rev 6555)
+++ sion/trunk/src/bookmarkeditdialog.c 2009-01-25 22:12:17 UTC (rev 6556)
@@ -31,6 +31,7 @@
#include "bookmark.h"
#include "bookmarkeditdialog.h"
+
typedef struct _SionBookmarkEditDialogPrivate SionBookmarkEditDialogPrivate;
#define SION_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj),\
Modified: sion/trunk/src/common.c
===================================================================
--- sion/trunk/src/common.c 2009-01-25 22:11:56 UTC (rev 6555)
+++ sion/trunk/src/common.c 2009-01-25 22:12:17 UTC (rev 6556)
@@ -26,10 +26,19 @@
#include "common.h"
#include "main.h"
-#include "settings.h"
-#include "window.h"
+const gchar *sion_get_application_icon_name(void)
+{
+ static const gchar *icon_name = NULL;
+
+ if (icon_name == NULL)
+ icon_name = sion_find_icon_name("gtk-network", "gtk-connect");
+
+ return icon_name;
+}
+
+
const gchar *sion_find_icon_name(const gchar *request, const gchar *fallback)
{
GtkIconTheme *theme = gtk_icon_theme_get_default();
@@ -133,7 +142,7 @@
if (secondary != NULL)
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", secondary);
gtk_window_set_title(GTK_WINDOW(dialog), _("Error"));
- gtk_window_set_icon_name(GTK_WINDOW(dialog), sion_window_get_icon_name());
+ gtk_window_set_icon_name(GTK_WINDOW(dialog), sion_get_application_icon_name());
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
}
Modified: sion/trunk/src/common.h
===================================================================
--- sion/trunk/src/common.h 2009-01-25 22:11:56 UTC (rev 6555)
+++ sion/trunk/src/common.h 2009-01-25 22:12:17 UTC (rev 6556)
@@ -62,4 +62,6 @@
void sion_error_dialog(gpointer *parent, const gchar *text, const gchar *secondary);
+const gchar *sion_get_application_icon_name(void);
+
#endif /* __COMMON_H__ */
Modified: sion/trunk/src/main.c
===================================================================
--- sion/trunk/src/main.c 2009-01-25 22:11:56 UTC (rev 6555)
+++ sion/trunk/src/main.c 2009-01-25 22:12:17 UTC (rev 6556)
@@ -91,9 +91,9 @@
GOptionContext *context;
GtkWidget *window;
- bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
- bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
- textdomain(GETTEXT_PACKAGE);
+ bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+ textdomain(GETTEXT_PACKAGE);
context = g_option_context_new(_("- a simple frontend to easily connect to remote filesystems"));
g_option_context_add_main_entries(context, cli_options, GETTEXT_PACKAGE);
Added: sion/trunk/src/mountdialog.c
===================================================================
--- sion/trunk/src/mountdialog.c (rev 0)
+++ sion/trunk/src/mountdialog.c 2009-01-25 22:12:17 UTC (rev 6556)
@@ -0,0 +1,160 @@
+/*
+ * mountdialog.c
+ *
+ * Copyright 2009 Enrico Tröger <enrico(at)xfce(dot)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; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#include "config.h"
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+
+#include "common.h"
+#include "compat.h"
+#include "main.h"
+#include "mountdialog.h"
+
+
+typedef struct _SionMountDialogPrivate SionMountDialogPrivate;
+
+#define SION_MOUNT_DIALOG_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj),\
+ SION_MOUNT_DIALOG_TYPE, SionMountDialogPrivate))
+
+struct _SionMountDialog
+{
+ GtkDialog parent;
+};
+
+struct _SionMountDialogClass
+{
+ GtkDialogClass parent_class;
+};
+
+struct _SionMountDialogPrivate
+{
+ GtkWidget *label;
+ guint timer_id;
+};
+
+static void sion_mount_dialog_class_init (SionMountDialogClass *klass);
+static void sion_mount_dialog_init (SionMountDialog *self);
+static void sion_mount_dialog_destroy (GtkObject *widget);
+
+/* Local data */
+static GtkDialogClass *parent_class = NULL;
+
+GType sion_mount_dialog_get_type(void)
+{
+ static GType self_type = 0;
+ if (! self_type)
+ {
+ static const GTypeInfo self_info =
+ {
+ sizeof(SionMountDialogClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc)sion_mount_dialog_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof(SionMountDialog),
+ 0,
+ (GInstanceInitFunc)sion_mount_dialog_init,
+ NULL /* value_table */
+ };
+
+ self_type = g_type_register_static(GTK_TYPE_DIALOG, "SionMountDialog", &self_info, 0);
+ }
+
+ return self_type;
+}
+
+
+static void sion_mount_dialog_class_init(SionMountDialogClass *klass)
+{
+ GtkObjectClass *object_class = GTK_OBJECT_CLASS(klass);
+
+ object_class->destroy = sion_mount_dialog_destroy;
+
+ parent_class = (GtkDialogClass*)g_type_class_peek(GTK_TYPE_DIALOG);
+ g_type_class_add_private((gpointer)klass, sizeof(SionMountDialogPrivate));
+}
+
+
+static void sion_mount_dialog_destroy(GtkObject *widget)
+{
+ SionMountDialogPrivate *priv = SION_MOUNT_DIALOG_GET_PRIVATE(widget);
+
+ debug(__func__);
+ if (priv->timer_id != (guint) -1)
+ {
+ g_source_remove(priv->timer_id);
+ priv->timer_id = -1;
+ }
+
+ GTK_OBJECT_CLASS(parent_class)->destroy(widget);
+}
+
+
+static gboolean do_pulse(gpointer data)
+{
+ gtk_progress_bar_pulse(GTK_PROGRESS_BAR(data));
+
+ return TRUE;
+}
+
+
+static void sion_mount_dialog_init(SionMountDialog *self)
+{
+ GtkWidget *vbox, *progress;
+ SionMountDialogPrivate *priv = SION_MOUNT_DIALOG_GET_PRIVATE(self);
+
+ priv->timer_id = (guint) -1;
+
+ gtk_dialog_set_has_separator(GTK_DIALOG(self), FALSE);
+ gtk_window_set_destroy_with_parent(GTK_WINDOW(self), TRUE);
+ gtk_window_set_default_size(GTK_WINDOW(self), 200, -1);
+ gtk_window_set_title(GTK_WINDOW(self), _("Mounting"));
+
+ vbox = gtk_vbox_new(FALSE, 0);
+ gtk_container_set_border_width(GTK_CONTAINER(vbox), 5);
+ gtk_container_add(GTK_CONTAINER(sion_dialog_get_content_area(GTK_DIALOG(self))), vbox);
+
+ priv->label = gtk_label_new(NULL);
+ gtk_misc_set_alignment(GTK_MISC(priv->label), 0.1, 0.5);
+ gtk_box_pack_start(GTK_BOX(vbox), priv->label, FALSE, FALSE, 6);
+
+ progress = gtk_progress_bar_new();
+ gtk_box_pack_start(GTK_BOX(vbox), progress, FALSE, FALSE, 6);
+
+ priv->timer_id = g_timeout_add(250, do_pulse, GTK_PROGRESS_BAR(progress));
+}
+
+
+GtkWidget *sion_mount_dialog_new(GtkWindow *parent, const gchar *label)
+{
+ GtkWidget *dialog = g_object_new(SION_MOUNT_DIALOG_TYPE,
+ "transient-for", parent,
+ "icon-name", sion_get_application_icon_name(),
+ NULL);
+ SionMountDialogPrivate *priv = SION_MOUNT_DIALOG_GET_PRIVATE(dialog);
+
+ gtk_label_set_text(GTK_LABEL(priv->label), label);
+
+ return dialog;
+}
+
+
Property changes on: sion/trunk/src/mountdialog.c
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: sion/trunk/src/mountdialog.h
===================================================================
--- sion/trunk/src/mountdialog.h (rev 0)
+++ sion/trunk/src/mountdialog.h 2009-01-25 22:12:17 UTC (rev 6556)
@@ -0,0 +1,45 @@
+/*
+ * mountdialog.h
+ *
+ * Copyright 2009 Enrico Tröger <enrico(at)xfce(dot)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; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef __MOUNTDIALOG_H__
+#define __MOUNTDIALOG_H__
+
+G_BEGIN_DECLS
+
+#define SION_MOUNT_DIALOG_TYPE (sion_mount_dialog_get_type())
+#define SION_MOUNT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\
+ SION_MOUNT_DIALOG_TYPE, SionMountDialog))
+#define SION_MOUNT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),\
+ SION_MOUNT_DIALOG_TYPE, SionMountDialogClass))
+#define IS_SION_MOUNT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),\
+ SION_MOUNT_DIALOG_TYPE))
+#define IS_SION_MOUNT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),\
+ SION_MOUNT_DIALOG_TYPE))
+
+typedef struct _SionMountDialog SionMountDialog;
+typedef struct _SionMountDialogClass SionMountDialogClass;
+
+
+GType sion_mount_dialog_get_type (void);
+GtkWidget* sion_mount_dialog_new (GtkWindow *parent, const gchar *label);
+
+G_END_DECLS
+
+#endif /* __MOUNTDIALOG_H__ */
Property changes on: sion/trunk/src/mountdialog.h
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: sion/trunk/src/preferencesdialog.c
===================================================================
--- sion/trunk/src/preferencesdialog.c 2009-01-25 22:11:56 UTC (rev 6555)
+++ sion/trunk/src/preferencesdialog.c 2009-01-25 22:12:17 UTC (rev 6556)
@@ -27,7 +27,6 @@
#include "common.h"
#include "compat.h"
#include "settings.h"
-#include "window.h"
#include "preferencesdialog.h"
@@ -36,11 +35,6 @@
#define SION_PREFERENCES_DIALOG_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj),\
SION_PREFERENCES_DIALOG_TYPE, SionPreferencesDialogPrivate))
-struct _SionPreferencesDialogPrivate
-{
- SionWindow *window;
-};
-
static void sion_preferences_dialog_class_init (SionPreferencesDialogClass *klass);
static void sion_preferences_dialog_init (SionPreferencesDialog *dialog);
@@ -351,7 +345,7 @@
{
GtkWidget *heading;
heading = xfce_header_new(
- sion_window_get_icon_name(),
+ sion_get_application_icon_name(),
gtk_window_get_title(GTK_WINDOW(dialog)));
gtk_box_pack_start(GTK_BOX(vbox), heading, FALSE, FALSE, 0);
}
@@ -532,7 +526,6 @@
G_PARAM_WRITABLE));
parent_class = (GtkDialogClass*)g_type_class_peek(GTK_TYPE_DIALOG);
- g_type_class_add_private((gpointer)klass, sizeof(SionPreferencesDialogPrivate));
}
Modified: sion/trunk/src/window.c
===================================================================
--- sion/trunk/src/window.c 2009-01-25 22:11:56 UTC (rev 6555)
+++ sion/trunk/src/window.c 2009-01-25 22:12:17 UTC (rev 6556)
@@ -36,6 +36,7 @@
#include "menubuttonaction.h"
#include "preferencesdialog.h"
#include "backendgvfs.h"
+#include "mountdialog.h"
#include "main.h"
@@ -216,17 +217,6 @@
}
-const gchar *sion_window_get_icon_name(void)
-{
- static const gchar *icon_name = NULL;
-
- if (icon_name == NULL)
- icon_name = sion_find_icon_name("gtk-network", "gtk-connect");
-
- return icon_name;
-}
-
-
static void systray_icon_activate_cb(G_GNUC_UNUSED GtkStatusIcon *status_icon, GtkWindow *window)
{
if (gtk_window_is_active(window))
@@ -304,18 +294,32 @@
}
-static void mount_from_bookmark(SionWindow *window, SionBookmark *bookmark)
+static void mount_from_bookmark(SionWindow *window, SionBookmark *bookmark, gboolean show_dialog)
{
gchar *uri;
+ GtkWidget *dialog = NULL;
SionWindowPrivate *priv;
g_return_if_fail(window != NULL);
g_return_if_fail(bookmark != NULL);
priv = SION_WINDOW_GET_PRIVATE(window);
+
uri = sion_bookmark_get_uri(bookmark);
- sion_backend_gvfs_mount_uri(priv->backend_gvfs, uri, sion_bookmark_get_domain(bookmark));
+ if (show_dialog)
+ {
+ const gchar *name = sion_bookmark_get_name(bookmark);
+ gchar *label = g_strdup_printf(_("Mounting \"%s\""), (name != NULL) ? name : uri);
+
+ dialog = sion_mount_dialog_new(GTK_WINDOW(window), label);
+ gtk_widget_show_all(dialog);
+
+ g_free(label);
+ }
+
+ sion_backend_gvfs_mount_uri(priv->backend_gvfs, uri, sion_bookmark_get_domain(bookmark), dialog);
+
if (sion_bookmark_get_autoconnect(bookmark))
sion_bookmark_set_should_not_autoconnect(bookmark, FALSE);
@@ -356,7 +360,7 @@
/* this fills the values of the dialog into 'bm' */
g_object_set(dialog, "bookmark-update", bm, NULL);
- mount_from_bookmark(window, bm);
+ mount_from_bookmark(window, bm, TRUE);
g_object_unref(bm);
}
@@ -447,7 +451,7 @@
gtk_about_dialog_set_url_hook(about_activate_link, NULL, NULL);
gtk_show_about_dialog(GTK_WINDOW(window),
"authors", authors,
- "logo-icon-name", sion_window_get_icon_name(),
+ "logo-icon-name", sion_get_application_icon_name(),
"comments", "A simple frontend to easily connect to remote filesystems",
"copyright", "Copyright 2008-2009 Enrico Tröger",
"website", "http://www.uvena.de/sion/",
@@ -775,7 +779,7 @@
{
SionBookmark *bm = g_object_get_data(G_OBJECT(item), "bookmark");
- mount_from_bookmark(window, bm);
+ mount_from_bookmark(window, bm, TRUE);
}
@@ -834,7 +838,7 @@
SionBookmark *bm = g_ptr_array_index(bookmarks, i);
if (sion_bookmark_get_autoconnect(bm) && ! sion_bookmark_get_should_not_autoconnect(bm))
{
- mount_from_bookmark(window, bm);
+ mount_from_bookmark(window, bm, FALSE);
}
}
return TRUE;
@@ -1211,7 +1215,7 @@
priv->autoconnect_timeout_id = (guint) -1;
gtk_window_set_title(GTK_WINDOW(window), _("Sion"));
- gtk_window_set_icon_name(GTK_WINDOW(window), sion_window_get_icon_name());
+ gtk_window_set_icon_name(GTK_WINDOW(window), sion_get_application_icon_name());
gtk_window_set_default_size(GTK_WINDOW(window), 550, 350);
/* Init liststore */
@@ -1285,7 +1289,7 @@
gtk_widget_show_all(priv->swin_treeview);
/* Status icon */
- priv->systray_icon = gtk_status_icon_new_from_icon_name(sion_window_get_icon_name());
+ priv->systray_icon = gtk_status_icon_new_from_icon_name(sion_get_application_icon_name());
sion_status_icon_set_tooltip_text(priv->systray_icon, _("Sion"));
g_signal_connect(priv->systray_icon, "activate", G_CALLBACK(systray_icon_activate_cb), window);
g_signal_connect(priv->systray_icon, "popup-menu", G_CALLBACK(systray_icon_popup_menu_cb), window);
Modified: sion/trunk/src/window.h
===================================================================
--- sion/trunk/src/window.h 2009-01-25 22:11:56 UTC (rev 6555)
+++ sion/trunk/src/window.h 2009-01-25 22:12:17 UTC (rev 6556)
@@ -32,6 +32,7 @@
#define IS_SION_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SION_WINDOW_TYPE))
+
typedef struct _SionWindow SionWindow;
typedef struct _SionWindowClass SionWindowClass;
@@ -52,8 +53,6 @@
gboolean sion_window_do_autoconnect (gpointer data);
-const gchar* sion_window_get_icon_name (void);
-
G_END_DECLS
#endif /* __WINDOW_H__ */
Modified: sion/trunk/wscript
===================================================================
--- sion/trunk/wscript 2009-01-25 22:11:56 UTC (rev 6555)
+++ sion/trunk/wscript 2009-01-25 22:12:17 UTC (rev 6556)
@@ -36,7 +36,7 @@
sources = [ 'src/main.c', 'src/compat.c', 'src/window.c', 'src/bookmark.c', 'src/settings.c',
'src/menubuttonaction.c', 'src/passworddialog.c', 'src/bookmarkdialog.c',
'src/bookmarkeditdialog.c', 'src/preferencesdialog.c', 'src/backendgvfs.c',
- 'src/common.c' ]
+ 'src/common.c', 'src/mountdialog.c' ]
More information about the Goodies-commits
mailing list