r26356 - in /desktop/experimental/gnome-screensaver/debian: changelog patches/ patches/0001-remove-cancel-button-and-set-a-minimum-width.patch patches/0002-add-a-gnome-3-style-panel-with-a-clock.patch patches/series
pochu at users.alioth.debian.org
pochu at users.alioth.debian.org
Wed Jan 19 22:05:52 UTC 2011
Author: pochu
Date: Wed Jan 19 22:05:43 2011
New Revision: 26356
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=26356
Log:
* debian/patches/0001-remove-cancel-button-and-set-a-minimum-width.patch,
debian/patches/0002-add-a-gnome-3-style-panel-with-a-clock.patch:
+ Taken from upstream git, make the screensaver more GNOME 3.
Added:
desktop/experimental/gnome-screensaver/debian/patches/
desktop/experimental/gnome-screensaver/debian/patches/0001-remove-cancel-button-and-set-a-minimum-width.patch
desktop/experimental/gnome-screensaver/debian/patches/0002-add-a-gnome-3-style-panel-with-a-clock.patch
desktop/experimental/gnome-screensaver/debian/patches/series
Modified:
desktop/experimental/gnome-screensaver/debian/changelog
Modified: desktop/experimental/gnome-screensaver/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gnome-screensaver/debian/changelog?rev=26356&op=diff
==============================================================================
--- desktop/experimental/gnome-screensaver/debian/changelog [utf-8] (original)
+++ desktop/experimental/gnome-screensaver/debian/changelog [utf-8] Wed Jan 19 22:05:43 2011
@@ -7,6 +7,9 @@
debian/rules,
debian/source/format:
+ Switch to source format 3.0 (quilt).
+ * debian/patches/0001-remove-cancel-button-and-set-a-minimum-width.patch,
+ debian/patches/0002-add-a-gnome-3-style-panel-with-a-clock.patch:
+ + Taken from upstream git, make the screensaver more GNOME 3.
-- Emilio Pozuelo Monfort <pochu at debian.org> Wed, 19 Jan 2011 21:10:47 +0000
Added: desktop/experimental/gnome-screensaver/debian/patches/0001-remove-cancel-button-and-set-a-minimum-width.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gnome-screensaver/debian/patches/0001-remove-cancel-button-and-set-a-minimum-width.patch?rev=26356&op=file
==============================================================================
--- desktop/experimental/gnome-screensaver/debian/patches/0001-remove-cancel-button-and-set-a-minimum-width.patch (added)
+++ desktop/experimental/gnome-screensaver/debian/patches/0001-remove-cancel-button-and-set-a-minimum-width.patch [utf-8] Wed Jan 19 22:05:43 2011
@@ -1,0 +1,95 @@
+From 6ba3d6e43891dba2477a0b63fb65513fadefb291 Mon Sep 17 00:00:00 2001
+From: William Jon McCann <jmccann at redhat.com>
+Date: Tue, 11 Jan 2011 20:25:08 -0500
+Subject: [PATCH 1/2] remove cancel button and set a minimum width
+
+---
+ src/gs-lock-plug.c | 24 ++++--------------------
+ 1 files changed, 4 insertions(+), 20 deletions(-)
+
+diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c
+index 2ccd8b2..41365cd 100644
+--- a/src/gs-lock-plug.c
++++ b/src/gs-lock-plug.c
+@@ -1,6 +1,7 @@
+ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+- * Copyright (C) 2004-2006 William Jon McCann <mccann at jhu.edu>
++ * Copyright (C) 2004-2008 William Jon McCann <mccann at jhu.edu>
++ * Copyright (C) 2008-2011 Red Hat, Inc.
+ *
+ * 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
+@@ -16,8 +17,6 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+- * Authors: William Jon McCann <mccann at jhu.edu>
+- *
+ */
+
+ #include "config.h"
+@@ -84,7 +83,6 @@ struct GSLockPlugPrivate
+
+ GtkWidget *auth_unlock_button;
+ GtkWidget *auth_switch_button;
+- GtkWidget *auth_cancel_button;
+ GtkWidget *auth_logout_button;
+
+ GtkWidget *auth_prompt_kbd_layout_indicator;
+@@ -1236,8 +1234,6 @@ gs_lock_plug_disable_prompt (GSLockPlug *plug)
+ gtk_widget_set_sensitive (plug->priv->auth_unlock_button, FALSE);
+ gtk_widget_set_sensitive (plug->priv->auth_prompt_entry, FALSE);
+ /* gtk_widget_hide (plug->priv->auth_unlock_button); */
+-
+- gtk_widget_grab_default (plug->priv->auth_cancel_button);
+ }
+
+ void
+@@ -1369,10 +1365,6 @@ create_page_one_buttons (GSLockPlug *plug)
+ gtk_button_set_focus_on_click (GTK_BUTTON (plug->priv->auth_logout_button), FALSE);
+ gtk_widget_set_no_show_all (plug->priv->auth_logout_button, TRUE);
+
+- plug->priv->auth_cancel_button = gs_lock_plug_add_button (GS_LOCK_PLUG (plug),
+- plug->priv->auth_action_area,
+- GTK_STOCK_CANCEL);
+- gtk_button_set_focus_on_click (GTK_BUTTON (plug->priv->auth_cancel_button), FALSE);
+
+ plug->priv->auth_unlock_button = gs_lock_plug_add_button (GS_LOCK_PLUG (plug),
+ plug->priv->auth_action_area,
+@@ -1597,13 +1589,6 @@ unlock_button_clicked (GtkButton *button,
+ }
+
+ static void
+-cancel_button_clicked (GtkButton *button,
+- GSLockPlug *plug)
+-{
+- gs_lock_plug_response (plug, GS_LOCK_PLUG_RESPONSE_CANCEL);
+-}
+-
+-static void
+ switch_user_button_clicked (GtkButton *button,
+ GSLockPlug *plug)
+ {
+@@ -1723,9 +1708,6 @@ gs_lock_plug_init (GSLockPlug *plug)
+ g_signal_connect (plug->priv->auth_unlock_button, "clicked",
+ G_CALLBACK (unlock_button_clicked), plug);
+
+- g_signal_connect (plug->priv->auth_cancel_button, "clicked",
+- G_CALLBACK (cancel_button_clicked), plug);
+-
+ if (plug->priv->status_message_label) {
+ if (plug->priv->status_message) {
+ gtk_label_set_text (GTK_LABEL (plug->priv->status_message_label),
+@@ -1748,6 +1730,8 @@ gs_lock_plug_init (GSLockPlug *plug)
+
+ g_signal_connect (plug, "delete_event", G_CALLBACK (delete_handler), NULL);
+
++ gtk_widget_set_size_request (GTK_WIDGET (plug), 450, -1);
++
+ gs_profile_end (NULL);
+ }
+
+--
+1.7.2.3
+
Added: desktop/experimental/gnome-screensaver/debian/patches/0002-add-a-gnome-3-style-panel-with-a-clock.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gnome-screensaver/debian/patches/0002-add-a-gnome-3-style-panel-with-a-clock.patch?rev=26356&op=file
==============================================================================
--- desktop/experimental/gnome-screensaver/debian/patches/0002-add-a-gnome-3-style-panel-with-a-clock.patch (added)
+++ desktop/experimental/gnome-screensaver/debian/patches/0002-add-a-gnome-3-style-panel-with-a-clock.patch [utf-8] Wed Jan 19 22:05:43 2011
@@ -1,0 +1,216 @@
+From 46675b955be241a7481f1a234d5473e05ea93afc Mon Sep 17 00:00:00 2001
+From: William Jon McCann <jmccann at redhat.com>
+Date: Tue, 11 Jan 2011 21:44:58 -0500
+Subject: [PATCH 2/2] add a gnome 3 style panel with a clock
+
+moving a bit closer to http://live.gnome.org/GnomeShell/Design/Whiteboards/ScreenLock
+---
+ src/gs-window-x11.c | 131 +++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 128 insertions(+), 3 deletions(-)
+
+diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
+index abbe379..4cacd33 100644
+--- a/src/gs-window-x11.c
++++ b/src/gs-window-x11.c
+@@ -1,6 +1,7 @@
+ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2004-2008 William Jon McCann <mccann at jhu.edu>
++ * Copyright (C) 2008-2011 Red Hat, Inc.
+ *
+ * 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
+@@ -16,17 +17,17 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+- * Authors: William Jon McCann <mccann at jhu.edu>
+- *
+ */
+
+ #include "config.h"
+
++#include <sys/time.h>
+ #include <sys/types.h>
+ #include <errno.h>
+ #include <sys/wait.h>
+ #include <string.h>
+
++#include <glib/gi18n.h>
+ #include <gdk/gdkx.h>
+ #include <gdk/gdkkeysyms.h>
+ #include <gtk/gtk.h>
+@@ -77,6 +78,8 @@ struct GSWindowPrivate
+ char *status_message;
+
+ GtkWidget *vbox;
++ GtkWidget *panel;
++ GtkWidget *clock;
+ GtkWidget *drawing_area;
+ GtkWidget *lock_box;
+ GtkWidget *lock_socket;
+@@ -94,6 +97,7 @@ struct GSWindowPrivate
+
+ guint watchdog_timer_id;
+ guint info_bar_timer_id;
++ guint clock_update_id;
+
+ gint lock_pid;
+ gint lock_watch_id;
+@@ -140,6 +144,8 @@ static guint signals [LAST_SIGNAL] = { 0, };
+
+ G_DEFINE_TYPE (GSWindow, gs_window, GTK_TYPE_WINDOW)
+
++static void queue_clock_update (GSWindow *window);
++
+ static void
+ set_invisible_cursor (GdkWindow *window,
+ gboolean invisible)
+@@ -2262,6 +2268,116 @@ create_info_bar (GSWindow *window)
+ gtk_box_pack_end (GTK_BOX (window->priv->vbox), window->priv->info_bar, FALSE, FALSE, 0);
+ }
+
++static gboolean
++on_panel_draw (GtkWidget *widget,
++ cairo_t *cr,
++ GSWindow *window)
++{
++ cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 1.0);
++ cairo_paint (cr);
++
++ return FALSE;
++}
++
++static void
++update_clock (GSWindow *window)
++{
++ const char *clock_format;
++ char *text;
++ char *markup;
++ gboolean use_24 = FALSE;
++ GDateTime *dt;
++
++ /* clock */
++ /* FIXME: set 12/24 hour */
++ if (use_24)
++ clock_format = _("%a %R");
++ else
++ clock_format = _("%a %l:%M %p");
++
++ dt = g_date_time_new_now_local ();
++ text = g_date_time_format (dt, clock_format);
++ markup = g_strdup_printf ("<b><span foreground=\"white\">%s</span></b>", text);
++ gtk_label_set_markup (GTK_LABEL (window->priv->clock), markup);
++ g_free (markup);
++ g_free (text);
++ g_date_time_unref (dt);
++}
++
++
++static gboolean
++update_clock_timer (GSWindow *window)
++{
++ update_clock (window);
++ queue_clock_update (window);
++ return FALSE;
++}
++
++static void
++queue_clock_update (GSWindow *window)
++{
++ int timeouttime;
++ struct timeval tv;
++
++ gettimeofday (&tv, NULL);
++ timeouttime = (G_USEC_PER_SEC - tv.tv_usec) / 1000 + 1;
++
++ /* timeout of one minute if we don't care about the seconds */
++ timeouttime += 1000 * (59 - tv.tv_sec % 60);
++
++ window->priv->clock_update_id = g_timeout_add (timeouttime, (GSourceFunc)update_clock_timer, window);
++}
++
++static void
++create_panel (GSWindow *window)
++{
++ GtkWidget *left_hbox;
++ GtkWidget *right_hbox;
++ GtkWidget *alignment;
++ GtkSizeGroup *sg;
++ GdkRGBA bg;
++ GdkRGBA fg;
++ int all_states;
++
++ bg.red = 0;
++ bg.green = 0;
++ bg.blue = 0;
++ bg.alpha = 1.0;
++
++ fg.red = 1.0;
++ fg.green = 1.0;
++ fg.blue = 1.0;
++ fg.alpha = 1.0;
++
++ all_states = GTK_STATE_FLAG_NORMAL|GTK_STATE_FLAG_ACTIVE|GTK_STATE_FLAG_PRELIGHT|GTK_STATE_FLAG_SELECTED|GTK_STATE_FLAG_INSENSITIVE|GTK_STATE_FLAG_INCONSISTENT|GTK_STATE_FLAG_FOCUSED;
++
++ gtk_widget_override_background_color (window->priv->panel, all_states, &bg);
++ gtk_widget_override_color (window->priv->panel, all_states, &fg);
++ gtk_container_set_border_width (GTK_CONTAINER (window->priv->panel), 0);
++
++ g_signal_connect (window->priv->panel, "draw", G_CALLBACK (on_panel_draw), window);
++
++ left_hbox = gtk_hbox_new (FALSE, 6);
++ gtk_box_pack_start (GTK_BOX (window->priv->panel), left_hbox, TRUE, TRUE, 0);
++
++ alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
++ gtk_box_pack_start (GTK_BOX (window->priv->panel), alignment, FALSE, FALSE, 0);
++ window->priv->clock = gtk_label_new (NULL);
++ gtk_misc_set_padding (GTK_MISC (window->priv->clock), 4, 4);
++ update_clock (window);
++ queue_clock_update (window);
++ gtk_container_add (GTK_CONTAINER (alignment), window->priv->clock);
++
++ right_hbox = gtk_hbox_new (FALSE, 6);
++ gtk_box_pack_end (GTK_BOX (window->priv->panel), right_hbox, TRUE, TRUE, 0);
++
++ sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
++ gtk_size_group_add_widget (sg, left_hbox);
++ gtk_size_group_add_widget (sg, right_hbox);
++
++ gtk_widget_show_all (window->priv->panel);
++}
++
+ static void
+ gs_window_init (GSWindow *window)
+ {
+@@ -2296,10 +2412,15 @@ gs_window_init (GSWindow *window)
+ | GDK_ENTER_NOTIFY_MASK
+ | GDK_LEAVE_NOTIFY_MASK);
+
+- window->priv->vbox = gtk_vbox_new (FALSE, 12);
++ window->priv->vbox = gtk_vbox_new (FALSE, 0);
+ gtk_widget_show (window->priv->vbox);
+ gtk_container_add (GTK_CONTAINER (window), window->priv->vbox);
+
++ window->priv->panel = gtk_hbox_new (FALSE, 12);
++ gtk_widget_show (window->priv->panel);
++ gtk_box_pack_start (GTK_BOX (window->priv->vbox), window->priv->panel, FALSE, FALSE, 0);
++ create_panel (window);
++
+ window->priv->drawing_area = gtk_drawing_area_new ();
+ gtk_widget_show (window->priv->drawing_area);
+ gtk_widget_set_app_paintable (window->priv->drawing_area, TRUE);
+@@ -2337,6 +2458,10 @@ gs_window_finalize (GObject *object)
+ g_free (window->priv->logout_command);
+ g_free (window->priv->keyboard_command);
+
++ if (window->priv->clock_update_id > 0) {
++ g_source_remove (window->priv->clock_update_id);
++ }
++
+ if (window->priv->info_bar_timer_id > 0) {
+ g_source_remove (window->priv->info_bar_timer_id);
+ }
+--
+1.7.2.3
+
Added: desktop/experimental/gnome-screensaver/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gnome-screensaver/debian/patches/series?rev=26356&op=file
==============================================================================
--- desktop/experimental/gnome-screensaver/debian/patches/series (added)
+++ desktop/experimental/gnome-screensaver/debian/patches/series [utf-8] Wed Jan 19 22:05:43 2011
@@ -1,0 +1,2 @@
+0001-remove-cancel-button-and-set-a-minimum-width.patch
+0002-add-a-gnome-3-style-panel-with-a-clock.patch
More information about the pkg-gnome-commits
mailing list