aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-08-30 12:42:02 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-08-30 12:42:02 +0800
commit3843185df1e71e14e4f2e5d34aca34724090b496 (patch)
tree78c0b9336c798f106d25fceca4fd8a6be5f11301 /shell
parente0c501b7018f12d37b10e32923f95b7a01c7982c (diff)
downloadgsoc2013-evolution-3843185df1e71e14e4f2e5d34aca34724090b496.tar
gsoc2013-evolution-3843185df1e71e14e4f2e5d34aca34724090b496.tar.gz
gsoc2013-evolution-3843185df1e71e14e4f2e5d34aca34724090b496.tar.bz2
gsoc2013-evolution-3843185df1e71e14e4f2e5d34aca34724090b496.tar.lz
gsoc2013-evolution-3843185df1e71e14e4f2e5d34aca34724090b496.tar.xz
gsoc2013-evolution-3843185df1e71e14e4f2e5d34aca34724090b496.tar.zst
gsoc2013-evolution-3843185df1e71e14e4f2e5d34aca34724090b496.zip
Preferences window awesomeness.
svn path=/branches/kill-bonobo/; revision=36215
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-view.c17
-rw-r--r--shell/e-shell-view.h3
-rw-r--r--shell/e-shell-window-actions.c6
-rw-r--r--shell/test/e-test-shell-view.c14
4 files changed, 21 insertions, 19 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 02d53e0696..dec7a5bd96 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -302,9 +302,8 @@ shell_view_class_init (EShellViewClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EShellViewClass, changed),
NULL, NULL,
- g_cclosure_marshal_VOID__BOOLEAN,
- G_TYPE_NONE, 1,
- G_TYPE_BOOLEAN);
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
}
static void
@@ -531,17 +530,7 @@ e_shell_view_get_status_widget (EShellView *shell_view)
void
e_shell_view_changed (EShellView *shell_view)
{
- EShellWindow *shell_window;
- EShellView *current_view;
- const gchar *view_name;
- gboolean visible;
-
g_return_if_fail (E_IS_SHELL_VIEW (shell_view));
- shell_window = e_shell_view_get_window (shell_view);
- view_name = e_shell_window_get_current_view (shell_window);
- current_view = e_shell_window_get_view (shell_window, view_name);
- visible = (current_view == shell_view);
-
- g_signal_emit (shell_view, signals[CHANGED], 0, visible);
+ g_signal_emit (shell_view, signals[CHANGED], 0);
}
diff --git a/shell/e-shell-view.h b/shell/e-shell-view.h
index b474c0aa36..90aa35c450 100644
--- a/shell/e-shell-view.h
+++ b/shell/e-shell-view.h
@@ -71,8 +71,7 @@ struct _EShellViewClass {
/* Signals */
- void (*changed) (EShellView *shell_view,
- gboolean visible);
+ void (*changed) (EShellView *shell_view);
};
GType e_shell_view_get_type (void);
diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c
index 61f95576cd..a43333c5b1 100644
--- a/shell/e-shell-window-actions.c
+++ b/shell/e-shell-window-actions.c
@@ -734,6 +734,12 @@ action_preferences_cb (GtkAction *action,
GtkWidget *preferences_window;
preferences_window = e_shell_get_preferences_window ();
+ gtk_window_set_transient_for (
+ GTK_WINDOW (preferences_window),
+ GTK_WINDOW (shell_window));
+ gtk_window_set_position (
+ GTK_WINDOW (preferences_window),
+ GTK_WIN_POS_CENTER_ON_PARENT);
gtk_window_present (GTK_WINDOW (preferences_window));
/* FIXME Switch to a page appropriate for the current view. */
diff --git a/shell/test/e-test-shell-view.c b/shell/test/e-test-shell-view.c
index e2514ec236..db008fafea 100644
--- a/shell/test/e-test-shell-view.c
+++ b/shell/test/e-test-shell-view.c
@@ -90,21 +90,29 @@ test_shell_view_get_status_widget (EShellView *shell_view)
}
static void
-test_shell_view_changed (EShellView *shell_view,
- gboolean visible)
+test_shell_view_changed (EShellView *shell_view)
{
- g_debug ("%s (visible=%d)", G_STRFUNC, visible);
+ gboolean is_selected;
+ const gchar *selected;
+
+ is_selected = e_shell_view_is_selected (shell_view);
+ selected = is_selected ? "selected" : "not selected";
+ g_debug ("%s (%s)", G_STRFUNC, selected);
}
static void
test_shell_view_class_init (ETestShellViewClass *class,
GTypeModule *type_module)
{
+ GObjectClass *object_class;
EShellViewClass *shell_view_class;
parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (ETestShellViewPrivate));
+ object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = test_shell_view_dispose;
+
shell_view_class = E_SHELL_VIEW_CLASS (class);
shell_view_class->label = "Test";
shell_view_class->icon_name = "face-monkey";