Hello community,

here is the log from the commit of package lightdm-gtk-greeter for 
openSUSE:12.3 checked in at 2013-02-01 09:46:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3/lightdm-gtk-greeter (Old)
 and      /work/SRC/openSUSE:12.3/.lightdm-gtk-greeter.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lightdm-gtk-greeter", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:12.3/lightdm-gtk-greeter/lightdm-gtk-greeter.changes     
2013-01-31 01:26:17.000000000 +0100
+++ 
/work/SRC/openSUSE:12.3/.lightdm-gtk-greeter.new/lightdm-gtk-greeter.changes    
    2013-02-01 09:46:55.000000000 +0100
@@ -1,0 +2,17 @@
+Thu Jan 31 16:37:59 UTC 2013 - [email protected]
+
+- add lightdm-gtk-greeter-fix-cursor.patch in order to fix the
+  cursor theme by setting the cursor after selecting a GTK theme
+  (lp#1024482)
+- add lightdm-gtk-greeter-fix-background.patch in order to fix the
+  background image not being displayed when the pixmap does not
+  have an alpha channel (lp#1086199)
+- add lightdm-gtk-greeter-improve-background-scaling.patch which
+  scales the background pixmap while preserving the aspect until
+  width and height are at least as big as the screen width and
+  height, then clips as needed
+- add lightdm-gtk-greeter-fix-ui.patch with various usability
+  fixes, in particular switch back to a tree view inside a scrolled
+  window in order make it usable with a lot of users
+
+-------------------------------------------------------------------

New:
----
  lightdm-gtk-greeter-fix-background.patch
  lightdm-gtk-greeter-fix-cursor.patch
  lightdm-gtk-greeter-fix-ui.patch
  lightdm-gtk-greeter-improve-background-scaling.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lightdm-gtk-greeter.spec ++++++
--- /var/tmp/diff_new_pack.U5qFol/_old  2013-02-01 09:46:56.000000000 +0100
+++ /var/tmp/diff_new_pack.U5qFol/_new  2013-02-01 09:46:56.000000000 +0100
@@ -27,6 +27,16 @@
 Source0:        %{name}-%{version}.tar.gz
 # PATCH-FIX-UPSTREAM lightdm-gtk-greeter-use-new-autologin-api.patch 
[email protected] -- Use the new autologin API in liblightdm-gobject-1 >= 1.3.5 
(backported from upstream git)
 Patch0:         lightdm-gtk-greeter-use-new-autologin-api.patch
+# PATCH-FIX-UPSTREAM lightdm-gtk-greeter-fix-cursor.patch lp#1024482 
[email protected] -- Fix the cursor theme by setting the cursor after selecting 
a GTK theme
+Patch1:         lightdm-gtk-greeter-fix-cursor.patch
+# PATCH-FIX-UPSTREAM lightdm-gtk-greeter-fix-background.patch lp#1086199 
[email protected] -- Fix the background image not being displayed when the 
pixmap does not have an alpha channel
+Patch2:         lightdm-gtk-greeter-fix-background.patch
+# PATCH-FEATURE-UPSTREAM lightdm-gtk-greeter-improve-background-scaling.patch 
[email protected] -- Scale the background pixmap while preserving the aspect 
until width and height are at least as big as the screen width and height, then 
clip as needed
+Patch3:         lightdm-gtk-greeter-improve-background-scaling.patch
+# PATCH-FEATURE-UPSTREAM lightdm-gtk-greeter-fix-ui.patch [email protected] -- 
Various usability fixes, in particular switch back to a tree view inside a 
scrolled window in order make it usable with a lot of users
+Patch4:         lightdm-gtk-greeter-fix-ui.patch
+BuildRequires:  gnome-common
+BuildRequires:  gobject-introspection
 BuildRequires:  intltool
 BuildRequires:  pkgconfig(gmodule-export-2.0)
 BuildRequires:  pkgconfig(gtk+-3.0)
@@ -65,8 +75,13 @@
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
 
 %build
+autoreconf -fi
 %configure
 make %{?_smp_mflags} V=1
 

++++++ lightdm-gtk-greeter-fix-background.patch ++++++
Index: lightdm-gtk-greeter-1.3.1/src/lightdm-gtk-greeter.c
===================================================================
--- lightdm-gtk-greeter-1.3.1.orig/src/lightdm-gtk-greeter.c
+++ lightdm-gtk-greeter-1.3.1/src/lightdm-gtk-greeter.c
@@ -785,7 +785,14 @@ main (int argc, char **argv)
 
         g_debug ("Loading background %s", path);
         background_pixbuf = gdk_pixbuf_new_from_file (path, &error);
-        if (!background_pixbuf)
+        if (background_pixbuf)
+        {
+           /* Add alpha channel if it doesn't exist yet (lp#1024482) */
+           GdkPixbuf *background_pixbuf_tmp = gdk_pixbuf_add_alpha 
(background_pixbuf, FALSE, 0, 0, 0);
+           g_object_unref (G_OBJECT (background_pixbuf));
+           background_pixbuf = background_pixbuf_tmp;
+        }
+        else
            g_warning ("Failed to load background: %s", error->message);
         g_clear_error (&error);
         g_free (path);
@@ -874,6 +881,12 @@ main (int argc, char **argv)
         g_object_set (gtk_settings_get_default (), "gtk-xft-rgba", value, 
NULL);
     g_free (value);
 
+    /* Set default cursor */
+    GdkCursor *cursor;
+    cursor = gdk_cursor_new (GDK_LEFT_PTR);
+    gdk_window_set_cursor (gdk_get_default_root_window (), cursor);
+    g_object_unref(cursor);
+
     builder = gtk_builder_new ();
     if (!gtk_builder_add_from_file (builder, GREETER_DATA_DIR "/greeter.ui", 
&error))
     {
@@ -882,13 +895,6 @@ main (int argc, char **argv)
     }
     g_clear_error (&error);
 
-    /* Set default cursor */
-    // gdk_window_set_cursor (gdk_get_default_root_window (), gdk_cursor_new 
(GDK_LEFT_PTR));
-    GdkCursor *cursor;
-    cursor = gdk_cursor_new (GDK_LEFT_PTR);
-    gdk_window_set_cursor (gdk_get_default_root_window (), cursor);
-    g_object_unref(cursor);
-
     login_window = GTK_WINDOW (gtk_builder_get_object (builder, 
"login_window"));
     login_box = GTK_WIDGET (gtk_builder_get_object (builder, "login_box"));
     login_button = GTK_BUTTON (gtk_builder_get_object (builder, 
"login_button"));
++++++ lightdm-gtk-greeter-fix-cursor.patch ++++++
Index: lightdm-gtk-greeter-1.3.1/src/lightdm-gtk-greeter.c
===================================================================
--- lightdm-gtk-greeter-1.3.1.orig/src/lightdm-gtk-greeter.c
+++ lightdm-gtk-greeter-1.3.1/src/lightdm-gtk-greeter.c
@@ -769,9 +769,6 @@ main (int argc, char **argv)
     if (!lightdm_greeter_connect_sync (greeter, NULL))
         return EXIT_FAILURE;
 
-    /* Set default cursor */
-    gdk_window_set_cursor (gdk_get_default_root_window (), gdk_cursor_new 
(GDK_LEFT_PTR));
-
     /* Load background */
     value = g_key_file_get_value (config, "greeter", "background", NULL);
     if (!value)
@@ -885,6 +882,13 @@ main (int argc, char **argv)
     }
     g_clear_error (&error);
 
+    /* Set default cursor */
+    // gdk_window_set_cursor (gdk_get_default_root_window (), gdk_cursor_new 
(GDK_LEFT_PTR));
+    GdkCursor *cursor;
+    cursor = gdk_cursor_new (GDK_LEFT_PTR);
+    gdk_window_set_cursor (gdk_get_default_root_window (), cursor);
+    g_object_unref(cursor);
+
     login_window = GTK_WINDOW (gtk_builder_get_object (builder, 
"login_window"));
     login_box = GTK_WIDGET (gtk_builder_get_object (builder, "login_box"));
     login_button = GTK_BUTTON (gtk_builder_get_object (builder, 
"login_button"));
++++++ lightdm-gtk-greeter-fix-ui.patch ++++++
Index: lightdm-gtk-greeter-1.3.1/data/greeter.ui
===================================================================
--- lightdm-gtk-greeter-1.3.1.orig/data/greeter.ui
+++ lightdm-gtk-greeter-1.3.1/data/greeter.ui
@@ -16,12 +16,13 @@
     <property name="decorated">False</property>
     <property name="has_resize_grip">False</property>
     <child>
-      <object class="GtkNotebook" id="login_notebook">
-        <property name="name">login_notebook</property>
-        <property name="width_request">400</property>
+      <object class="GtkFrame" id="login_frame">
+        <property name="name">login_frame</property>
+        <property name="width_request">550</property>
+        <property name="height_request">250</property>
         <property name="visible">True</property>
-        <property name="can_focus">True</property>
-        <property name="show_tabs">False</property>
+        <property name="can_focus">False</property>
+        <property name="shadow_type">out</property>
         <child>
           <object class="GtkVBox" id="vbox2">
             <property name="name">vbox2</property>
@@ -51,17 +52,32 @@
                 <property name="label" comments="This is a placeholder string 
and will be replaced with the hostname of the system">[hostname]</property>
               </object>
               <packing>
-                <property name="expand">True</property>
+                <property name="expand">False</property>
                 <property name="fill">True</property>
                 <property name="position">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkComboBox" id="user_combobox">
-                <property name="name">user_combobox</property>
+              <object class="GtkScrolledWindow" id="user_scrolledwindow">
+                <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="model">user_liststore</property>
-                <signal name="changed" 
handler="user_combobox_active_changed_cb" swapped="no"/>
+                <property name="hscrollbar_policy">automatic</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">etched-in</property>
+                <child>
+                  <object class="GtkTreeView" id="user_treeview">
+                    <property name="name">user_treeview</property>
+                    <property name="can_focus">True</property>
+                    <property name="model">user_liststore</property>
+                    <property name="headers_visible">False</property>
+                    <property name="fixed_height_mode">True</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection" 
id="treeview-selection1">
+                        <signal name="changed" 
handler="user_treeview_selection_changed_cb" swapped="no"/>
+                      </object>
+                    </child>
+                  </object>
+                </child>
               </object>
               <packing>
                 <property name="expand">True</property>
@@ -110,7 +126,7 @@
                     </child>
                   </object>
                   <packing>
-                    <property name="expand">True</property>
+                    <property name="expand">False</property>
                     <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
@@ -140,7 +156,7 @@
                         <property name="model">session_liststore</property>
                       </object>
                       <packing>
-                        <property name="expand">True</property>
+                        <property name="expand">False</property>
                         <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
@@ -152,7 +168,7 @@
                         <property name="model">language_liststore</property>
                       </object>
                       <packing>
-                        <property name="expand">True</property>
+                        <property name="expand">False</property>
                         <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
@@ -193,7 +209,7 @@
                     </child>
                   </object>
                   <packing>
-                    <property name="expand">True</property>
+                    <property name="expand">False</property>
                     <property name="fill">True</property>
                     <property name="position">2</property>
                   </packing>
@@ -207,9 +223,6 @@
             </child>
           </object>
         </child>
-        <child type="tab">
-          <placeholder/>
-        </child>
       </object>
     </child>
   </object>
Index: lightdm-gtk-greeter-1.3.1/src/lightdm-gtk-greeter.c
===================================================================
--- lightdm-gtk-greeter-1.3.1.orig/src/lightdm-gtk-greeter.c
+++ lightdm-gtk-greeter-1.3.1/src/lightdm-gtk-greeter.c
@@ -26,9 +26,9 @@ static gchar *state_filename;
 static GtkWindow *login_window, *panel_window;
 static GtkButton *login_button, *cancel_button;
 static GtkLabel *message_label, *prompt_label;
+static GtkTreeView *user_view;
 static GtkWidget *login_box, *prompt_box;
 static GtkEntry *prompt_entry;
-static GtkComboBox *user_combo;
 static GtkComboBox *session_combo;
 static GtkComboBox *language_combo;
 static gchar *default_font_name, *default_theme_name, *default_icon_theme_name;
@@ -220,6 +220,7 @@ static void
 cancel_authentication (void)
 {
     GtkTreeModel *model;
+    GtkTreeSelection *selection;
     GtkTreeIter iter;
     gboolean other = FALSE;
 
@@ -233,9 +234,9 @@ cancel_authentication (void)
     }
 
     /* Force refreshing the prompt_box for "Other" */
-    model = gtk_combo_box_get_model (user_combo);
-
-    if (gtk_combo_box_get_active_iter (user_combo, &iter))
+    selection = gtk_tree_view_get_selection (user_view);
+    model = gtk_tree_view_get_model (user_view);
+    if (gtk_tree_selection_get_selected (selection, &model, &iter))
     {
         gchar *user;
 
@@ -248,7 +249,7 @@ cancel_authentication (void)
     if (other || lightdm_greeter_get_hide_users_hint (greeter))
         start_authentication ("*other");
     else
-        gtk_widget_grab_focus (GTK_WIDGET (user_combo));
+        gtk_widget_grab_focus (GTK_WIDGET (user_view));
 }
 
 static void
@@ -291,17 +292,15 @@ start_session (void)
     g_free (session);
 }
 
-void user_combobox_active_changed_cb (GtkComboBox *widget, LightDMGreeter 
*greeter);
+void user_treeview_selection_changed_cb (GtkTreeSelection *selection);
 G_MODULE_EXPORT
 void
-user_combobox_active_changed_cb (GtkComboBox *widget, LightDMGreeter *greeter)
+user_treeview_selection_changed_cb (GtkTreeSelection *selection)
 {
     GtkTreeModel *model;
     GtkTreeIter iter;
 
-    model = gtk_combo_box_get_model (user_combo);
-
-    if (gtk_combo_box_get_active_iter (user_combo, &iter))
+    if (gtk_tree_selection_get_selected (selection, &model, &iter))
     {
         gchar *user;
 
@@ -480,7 +479,7 @@ user_added_cb (LightDMUserList *user_lis
     GtkTreeModel *model;
     GtkTreeIter iter;
 
-    model = gtk_combo_box_get_model (user_combo);
+    model = gtk_tree_view_get_model (user_view);
 
     gtk_list_store_append (GTK_LIST_STORE (model), &iter);
     gtk_list_store_set (GTK_LIST_STORE (model), &iter,
@@ -495,7 +494,7 @@ get_user_iter (const gchar *username, Gt
 {
     GtkTreeModel *model;
 
-    model = gtk_combo_box_get_model (user_combo);
+    model = gtk_tree_view_get_model (user_view);
   
     if (!gtk_tree_model_get_iter_first (model, iter))
         return FALSE;
@@ -523,8 +522,7 @@ user_changed_cb (LightDMUserList *user_l
     if (!get_user_iter (lightdm_user_get_name (user), &iter))
         return;
 
-    model = gtk_combo_box_get_model (user_combo);
-
+    model = gtk_tree_view_get_model (user_view);
     gtk_list_store_set (GTK_LIST_STORE (model), &iter,
                         0, lightdm_user_get_name (user),
                         1, lightdm_user_get_display_name (user),
@@ -541,7 +539,7 @@ user_removed_cb (LightDMUserList *user_l
     if (!get_user_iter (lightdm_user_get_name (user), &iter))
         return;
 
-    model = gtk_combo_box_get_model (user_combo);
+    model = gtk_tree_view_get_model (user_view);  
     gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
 }
 
@@ -613,7 +611,7 @@ load_user_list ()
     g_signal_connect (lightdm_user_list_get_instance (), "user-changed", 
G_CALLBACK (user_changed_cb), NULL);
     g_signal_connect (lightdm_user_list_get_instance (), "user-removed", 
G_CALLBACK (user_removed_cb), NULL);
 
-    model = gtk_combo_box_get_model (user_combo);
+    model = gtk_tree_view_get_model (user_view);
     items = lightdm_user_list_get_users (lightdm_user_list_get_instance ());
     for (item = items; item; item = item->next)
     {
@@ -665,7 +663,7 @@ load_user_list ()
             g_free (name);
             if (matched)
             {
-                gtk_combo_box_set_active_iter (user_combo, &iter);
+                gtk_tree_selection_select_iter (gtk_tree_view_get_selection 
(user_view), &iter);
                 set_login_button_label (selected_user);
                 start_authentication (selected_user);
                 break;
@@ -936,7 +934,6 @@ main (int argc, char **argv)
     prompt_label = GTK_LABEL (gtk_builder_get_object (builder, 
"prompt_label"));
     prompt_entry = GTK_ENTRY (gtk_builder_get_object (builder, 
"prompt_entry"));
     message_label = GTK_LABEL (gtk_builder_get_object (builder, 
"message_label"));
-    user_combo = GTK_COMBO_BOX (gtk_builder_get_object (builder, 
"user_combobox"));
     session_combo = GTK_COMBO_BOX (gtk_builder_get_object (builder, 
"session_combobox"));
     language_combo = GTK_COMBO_BOX (gtk_builder_get_object (builder, 
"language_combobox"));  
     panel_window = GTK_WINDOW (gtk_builder_get_object (builder, 
"panel_window"));
@@ -1053,18 +1050,16 @@ main (int argc, char **argv)
         set_language (NULL);
     }
 
-    renderer = gtk_cell_renderer_text_new();
-    gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (user_combo), renderer, TRUE);
-    gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (user_combo), renderer, 
"text", 1);
-    gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (user_combo), renderer, 
"weight", 2);
+    user_view = GTK_TREE_VIEW (gtk_builder_get_object (builder, 
"user_treeview"));
+    gtk_tree_view_insert_column_with_attributes (user_view, -1, "Name", 
gtk_cell_renderer_text_new(), "text", 1, "weight", 2, NULL);
 
     if (lightdm_greeter_get_hide_users_hint (greeter))
         start_authentication ("*other");
     else
     {
-        load_user_list ();
         gtk_widget_hide (GTK_WIDGET (cancel_button));
-        gtk_widget_show (GTK_WIDGET (user_combo));
+        load_user_list ();
+        gtk_widget_show (GTK_WIDGET (user_view));
     } 
 
     gtk_builder_connect_signals(builder, greeter);
++++++ lightdm-gtk-greeter-improve-background-scaling.patch ++++++
Index: lightdm-gtk-greeter-1.3.1/src/lightdm-gtk-greeter.c
===================================================================
--- lightdm-gtk-greeter-1.3.1.orig/src/lightdm-gtk-greeter.c
+++ lightdm-gtk-greeter-1.3.1/src/lightdm-gtk-greeter.c
@@ -10,6 +10,7 @@
  */
 
 #include <stdlib.h>
+#include <math.h>
 #include <locale.h>
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
@@ -819,9 +820,41 @@ main (int argc, char **argv)
 
             if (background_pixbuf)
             {
-                GdkPixbuf *pixbuf = gdk_pixbuf_scale_simple 
(background_pixbuf, monitor_geometry.width, monitor_geometry.height, 
GDK_INTERP_BILINEAR);
+                GdkPixbuf *pixbuf;
+                GdkPixbuf *scaled_pixbuf = NULL;
+                gdouble ratio_horiz, ratio_vert;
+                gint image_width, image_height, width, height;
+                gint offset_x = 0;
+                gint offset_y = 0;
+
+                image_width = gdk_pixbuf_get_width(background_pixbuf);
+                image_height = gdk_pixbuf_get_height(background_pixbuf);
+
+                if (image_width == monitor_geometry.width && image_height == 
monitor_geometry.height)
+                {
+                    pixbuf = gdk_pixbuf_copy (background_pixbuf);
+                } else {
+                    ratio_horiz = (gdouble) monitor_geometry.width / 
image_width;
+                    ratio_vert = (gdouble) monitor_geometry.height / 
image_height;
+                    if (ratio_vert > ratio_horiz)
+                    {
+                        width = (gint) round (image_width * ratio_vert);
+                        height = (gint) round (image_height * ratio_vert);
+                        offset_x = (gint) round (fabs ((gdouble) 
(monitor_geometry.width - width) / 2));
+                    }
+                    else
+                    {
+                        width = (gint) round (image_width * ratio_horiz);
+                        height = (gint) round (image_height * ratio_horiz);
+                        offset_y = (gint) round (fabs ((gdouble) 
(monitor_geometry.height - height) / 2));
+                    }
+                    scaled_pixbuf = gdk_pixbuf_scale_simple 
(background_pixbuf, width, height, GDK_INTERP_BILINEAR);
+                    pixbuf = gdk_pixbuf_new_subpixbuf (scaled_pixbuf, 
offset_x, offset_y, monitor_geometry.width, monitor_geometry.height);
+                }
                 gdk_cairo_set_source_pixbuf (c, pixbuf, monitor_geometry.x, 
monitor_geometry.y);
                 g_object_unref (pixbuf);
+                if (scaled_pixbuf)
+                    g_object_unref (scaled_pixbuf);
             }
             else
                 gdk_cairo_set_source_rgba (c, &background_color);
Index: lightdm-gtk-greeter-1.3.1/configure.ac
===================================================================
--- lightdm-gtk-greeter-1.3.1.orig/configure.ac
+++ lightdm-gtk-greeter-1.3.1/configure.ac
@@ -17,6 +17,9 @@ dnl ####################################
 dnl Dependencies
 dnl ###########################################################################
 
+AC_CHECK_HEADERS([math.h])
+AC_CHECK_LIB([m],[round])
+
 PKG_CHECK_MODULES(GREETER, [
     gtk+-3.0
     x11
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to