[bijiben] Fix regressions when several windows
- From: Pierre-Yves Luyten <pyluyten src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] Fix regressions when several windows
- Date: Sat, 15 Jun 2013 23:43:02 +0000 (UTC)
commit cfba2a4413f2d8ad18873053c2d17f7628133324
Author: Pierre-Yves Luyten <py luyten fr>
Date: Sun Jun 16 01:41:04 2013 +0200
Fix regressions when several windows
The window cannot be modal, use another way
Show new window
src/bjb-app-menu.c | 1 +
src/bjb-selection-toolbar.c | 19 +++++++++++++++++++
src/bjb-window-base.c | 1 -
3 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/src/bjb-app-menu.c b/src/bjb-app-menu.c
index 1af8b1b..d67bfc1 100644
--- a/src/bjb-app-menu.c
+++ b/src/bjb-app-menu.c
@@ -57,6 +57,7 @@ new_activated (GSimpleAction *action,
bjb_controller_set_needle (control, "");
bjb_window_base_switch_to (win, BJB_WINDOW_BASE_MAIN_VIEW);
+ gtk_widget_show_all (GTK_WIDGET (win));
}
diff --git a/src/bjb-selection-toolbar.c b/src/bjb-selection-toolbar.c
index 411a972..d171f43 100644
--- a/src/bjb-selection-toolbar.c
+++ b/src/bjb-selection-toolbar.c
@@ -62,12 +62,26 @@ struct _BjbSelectionToolbarPrivate
G_DEFINE_TYPE (BjbSelectionToolbar, bjb_selection_toolbar, GTK_TYPE_TOOLBAR);
+/*
+ * Color dialog is transient and could damage the display of self
+ * We do not want a modal window since the app may have several
+ * The fix is to hide self untill dialog has run
+ *
+ */
+static void
+hide_self (GtkWidget *self)
+{
+ gtk_widget_set_visible (self, FALSE);
+}
+
+
static void
action_color_selected_items (GtkWidget *w, BjbSelectionToolbar *self)
{
GList *l, *selection;
GdkRGBA color = {0,0,0,0};
+ gtk_widget_set_visible (GTK_WIDGET (self), TRUE);
gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (w), &color);
selection = bjb_main_view_get_selected_items (self->priv->view);
@@ -77,9 +91,11 @@ action_color_selected_items (GtkWidget *w, BjbSelectionToolbar *self)
biji_note_obj_set_rgba (l->data, &color);
}
+
g_list_free (selection);
}
+
static void
action_tag_selected_items (GtkWidget *w, BjbSelectionToolbar *self)
{
@@ -335,6 +351,9 @@ bjb_selection_toolbar_constructed(GObject *obj)
G_CALLBACK(bjb_selection_toolbar_selection_changed),
self);
+ g_signal_connect_swapped (priv->toolbar_color,"clicked",
+ G_CALLBACK (hide_self), self);
+
g_signal_connect (priv->toolbar_color,"color-set",
G_CALLBACK (action_color_selected_items), self);
diff --git a/src/bjb-window-base.c b/src/bjb-window-base.c
index f7a8ee1..88f4ae5 100644
--- a/src/bjb-window-base.c
+++ b/src/bjb-window-base.c
@@ -221,7 +221,6 @@ bjb_window_base_new(void)
return g_object_new (BJB_TYPE_WINDOW_BASE,
"application", g_application_get_default(),
"hide-titlebar-when-maximized", TRUE,
- "modal", TRUE,
NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]