[gnome-calendar] misc: updates to code style and docs
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] misc: updates to code style and docs
- Date: Thu, 4 Dec 2014 22:42:03 +0000 (UTC)
commit c9d347ccebafa13f29e38f49ca442d3b1d83ce77
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Wed Nov 5 09:38:51 2014 -0500
misc: updates to code style and docs
src/gcal-month-view.c | 4 ----
src/gcal-window.c | 15 ++++++++-------
2 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index 9218248..d2cce1c 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -615,10 +615,6 @@ gcal_month_view_draw (GtkWidget *widget,
pango_cairo_show_layout (cr, layout);
}
- g_debug ("drawing marks from %d => %d",
- priv->start_mark_cell,
- priv->end_mark_cell);
-
if (priv->start_mark_cell != -1 &&
priv->end_mark_cell != -1)
{
diff --git a/src/gcal-window.c b/src/gcal-window.c
index dbd95e5..c092f19 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -216,8 +216,6 @@ key_pressed (GtkWidget *widget,
priv = gcal_window_get_instance_private (GCAL_WINDOW (user_data));
modifiers = gtk_accelerator_get_default_mod_mask ();
- g_debug ("Catching key events");
-
/* case 1:close leave new event mode */
if (priv->new_event_mode &&
event->keyval == GDK_KEY_Escape)
@@ -447,6 +445,7 @@ update_view (GcalWindow *window)
* @pspec:
* @user_data:
*
+ * Called every time the user activate the stack-switcher
* Retrieve the enum value representing the view, update internal
* @active_view with it and call @update_view
**/
@@ -1040,7 +1039,8 @@ gcal_window_constructed (GObject *object)
/* header_bar: new */
priv->today_button = gtk_button_new_with_label (_("Today"));
- gtk_header_bar_pack_start (GTK_HEADER_BAR (priv->header_bar), priv->today_button);
+ gtk_header_bar_pack_start (GTK_HEADER_BAR (priv->header_bar),
+ priv->today_button);
priv->views_switcher = gtk_stack_switcher_new ();
g_object_ref_sink (priv->views_switcher);
@@ -1160,10 +1160,6 @@ gcal_window_constructed (GObject *object)
"active-date",
G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
- g_signal_connect_swapped (priv->views_stack, "destroy",
- G_CALLBACK (gtk_widget_destroy),
- priv->views[GCAL_WINDOW_VIEW_SEARCH]);
-
gtk_stack_switcher_set_stack (GTK_STACK_SWITCHER (priv->views_switcher),
GTK_STACK (priv->views_stack));
@@ -1186,6 +1182,11 @@ gcal_window_constructed (GObject *object)
g_signal_connect (object, "key-press-event",
G_CALLBACK (key_pressed), object);
+ /* HACK to ensure proper destroy of search-view widget */
+ g_signal_connect_swapped (priv->views_stack, "destroy",
+ G_CALLBACK (gtk_widget_destroy),
+ priv->views[GCAL_WINDOW_VIEW_SEARCH]);
+
/* only GcalView implementations */
for (i = 0; i < 4; ++i)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]