[arch-commits] Commit in cinnamon/trunk (PKGBUILD gtk3-lock-dialog.patch)

Balló György bgyorgy at nymeria.archlinux.org
Sun Jan 5 16:56:08 UTC 2014


    Date: Sunday, January 5, 2014 @ 17:56:08
  Author: bgyorgy
Revision: 103394

upgpkg: cinnamon 2.0.14-2

Port Lock screen dialog to GTK+ 3, remove pygtk dependency

Added:
  cinnamon/trunk/gtk3-lock-dialog.patch
Modified:
  cinnamon/trunk/PKGBUILD

------------------------+
 PKGBUILD               |    9 -
 gtk3-lock-dialog.patch |  418 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 425 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-01-05 16:19:24 UTC (rev 103393)
+++ PKGBUILD	2014-01-05 16:56:08 UTC (rev 103394)
@@ -6,7 +6,7 @@
 
 pkgname=cinnamon
 pkgver=2.0.14
-pkgrel=1
+pkgrel=2
 pkgdesc="Linux desktop which provides advanced innovative features and a traditional user experience"
 arch=('i686' 'x86_64')
 url="http://cinnamon.linuxmint.com/"
@@ -14,7 +14,7 @@
 depends=('accountsservice' 'caribou' 'cinnamon-settings-daemon' 'cinnamon-session'
          'cinnamon-translations' 'cjs' 'clutter-gtk' 'gconf' 'gnome-icon-theme'
          'gnome-menus' 'gnome-themes-standard' 'gstreamer' 'libgnome-keyring'
-         'librsvg' 'networkmanager' 'muffin' 'pygtk' 'python2-dbus' 'python2-pillow'
+         'librsvg' 'networkmanager' 'muffin' 'python2-dbus' 'python2-pillow'
          'python2-pam' 'python2-pexpect' 'python2-pyinotify' 'python2-lxml' 'webkitgtk'
          'cinnamon-control-center' 'cinnamon-screensaver' 'libgnomekbd'
          'network-manager-applet' 'nemo' 'polkit-gnome')
@@ -25,11 +25,13 @@
         "cinnamon-gstreamer1.patch"
         "keyboard_applet.patch"
         "input_keybindings.patch"
+        "gtk3-lock-dialog.patch"
         "org.archlinux.pkexec.cinnamon-settings-users.policy")
 sha256sums=('447f65ceb22a40717656d3d708d16ad450802298d783b23004b6e8d3c8d7da85'
             '2e10ba71fd9ba40afd7e9492b2fc0d5bcc27874bcde543cfd8a47ad20c52354a'
             '6acb07393105ddced8a4c3c869a596350d1a7d81a808ca5307d2ad770653a9d3'
             'e28c40eb844105154fa6106f5b4de3151a22805b3a7b2f84be9ea6c15cec3de6'
+            'e10dd01201b9274b45a6c94319d4eb1e9ff800e63f10a3d5e42fc9f3a87e337c'
             '371beac9e55d36f7629d2fc5cb40d6a3e6c0f4aac014f6fefdcd6743b5194b23')
 
 prepare() {
@@ -48,6 +50,9 @@
   # Port to GStreamer 1.0. Also backports some recorder bugfixes
   patch -Np1 -i ../cinnamon-gstreamer1.patch
 
+  # Port Lock screen dialog to GTK+ 3
+  patch -Np1 -i ../gtk3-lock-dialog.patch
+
   # Fix required components
   sed -i 's/cinnamon-fallback-mount-helper;/polkit-gnome-authentication-agent-1;/' files/usr/share/cinnamon-session/sessions/cinnamon*.session
 

Added: gtk3-lock-dialog.patch
===================================================================
--- gtk3-lock-dialog.patch	                        (rev 0)
+++ gtk3-lock-dialog.patch	2014-01-05 16:56:08 UTC (rev 103394)
@@ -0,0 +1,418 @@
+commit 7bb5af86b404d3e89f92019dba224e6fe258f7ea
+Author: Balló György <ballogyor at gmail.com>
+Date:   Sun Jan 5 16:54:41 2014 +0100
+
+    Port Lock screen dialog to GTK+ 3
+
+diff --git a/files/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.glade b/files/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.glade
+deleted file mode 100644
+index a4200f9..0000000
+--- a/files/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.glade
++++ /dev/null
+@@ -1,165 +0,0 @@
+-<?xml version="1.0" encoding="UTF-8"?>
+-<glade-interface>
+-  <!-- interface-requires gtk+ 2.24 -->
+-  <!-- interface-naming-policy project-wide -->
+-  <widget class="GtkDialog" id="main_dialog">
+-    <property name="can_focus">False</property>
+-    <property name="border_width">6</property>
+-    <property name="type_hint">dialog</property>
+-    <child internal-child="vbox">
+-      <widget class="GtkVBox" id="dialog-vbox1">
+-        <property name="visible">True</property>
+-        <property name="can_focus">False</property>
+-        <property name="spacing">6</property>
+-        <child internal-child="action_area">
+-          <widget class="GtkHButtonBox" id="dialog-action_area1">
+-            <property name="visible">True</property>
+-            <property name="can_focus">False</property>
+-            <property name="layout_style">end</property>
+-            <child>
+-              <widget class="GtkButton" id="button_cancel">
+-                <property name="label">gtk-cancel</property>
+-                <property name="visible">True</property>
+-                <property name="can_focus">True</property>
+-                <property name="receives_default">True</property>
+-                <property name="use_action_appearance">False</property>
+-                <property name="use_stock">True</property>
+-              </widget>
+-              <packing>
+-                <property name="expand">False</property>
+-                <property name="fill">False</property>
+-                <property name="position">0</property>
+-              </packing>
+-            </child>
+-            <child>
+-              <widget class="GtkButton" id="button_ok">
+-                <property name="label">gtk-ok</property>
+-                <property name="visible">True</property>
+-                <property name="can_focus">True</property>
+-                <property name="receives_default">True</property>
+-                <property name="use_action_appearance">False</property>
+-                <property name="use_stock">True</property>
+-              </widget>
+-              <packing>
+-                <property name="expand">False</property>
+-                <property name="fill">False</property>
+-                <property name="position">1</property>
+-              </packing>
+-            </child>
+-          </widget>
+-          <packing>
+-            <property name="expand">False</property>
+-            <property name="fill">True</property>
+-            <property name="padding">3</property>
+-            <property name="pack_type">end</property>
+-            <property name="position">0</property>
+-          </packing>
+-        </child>
+-        <child>
+-          <widget class="GtkImage" id="image_face">
+-            <property name="visible">True</property>
+-            <property name="can_focus">False</property>
+-            <property name="stock">gtk-missing-image</property>
+-          </widget>
+-          <packing>
+-            <property name="expand">False</property>
+-            <property name="fill">True</property>
+-            <property name="padding">3</property>
+-            <property name="position">1</property>
+-          </packing>
+-        </child>
+-        <child>
+-          <widget class="GtkLabel" id="label_description">
+-            <property name="visible">True</property>
+-            <property name="can_focus">False</property>
+-            <property name="label" translatable="yes">label</property>
+-          </widget>
+-          <packing>
+-            <property name="expand">False</property>
+-            <property name="fill">True</property>
+-            <property name="padding">3</property>
+-            <property name="position">2</property>
+-          </packing>
+-        </child>
+-        <child>
+-          <widget class="GtkHBox" id="hbox1">
+-            <property name="visible">True</property>
+-            <property name="can_focus">False</property>
+-            <child>
+-              <widget class="GtkLabel" id="label_away_message">
+-                <property name="visible">True</property>
+-                <property name="can_focus">False</property>
+-                <property name="label" translatable="yes">label</property>
+-              </widget>
+-              <packing>
+-                <property name="expand">False</property>
+-                <property name="fill">True</property>
+-                <property name="position">0</property>
+-              </packing>
+-            </child>
+-            <child>
+-              <widget class="GtkHBox" id="hbox3">
+-                <property name="visible">True</property>
+-                <property name="can_focus">False</property>
+-                <child>
+-                  <widget class="GtkLabel" id="label1">
+-                    <property name="visible">True</property>
+-                    <property name="can_focus">False</property>
+-                    <property name="label" translatable="yes"><b>"</b></property>
+-                    <property name="use_markup">True</property>
+-                  </widget>
+-                  <packing>
+-                    <property name="expand">False</property>
+-                    <property name="fill">True</property>
+-                    <property name="position">0</property>
+-                  </packing>
+-                </child>
+-                <child>
+-                  <widget class="GtkEntry" id="entry_away_message">
+-                    <property name="visible">True</property>
+-                    <property name="can_focus">True</property>
+-                    <property name="invisible_char">●</property>
+-                    <property name="invisible_char_set">True</property>
+-                    <property name="primary_icon_activatable">False</property>
+-                    <property name="secondary_icon_activatable">False</property>
+-                    <property name="primary_icon_sensitive">True</property>
+-                    <property name="secondary_icon_sensitive">True</property>
+-                  </widget>
+-                  <packing>
+-                    <property name="expand">True</property>
+-                    <property name="fill">True</property>
+-                    <property name="position">1</property>
+-                  </packing>
+-                </child>
+-                <child>
+-                  <widget class="GtkLabel" id="label2">
+-                    <property name="visible">True</property>
+-                    <property name="can_focus">False</property>
+-                    <property name="label" translatable="yes"><b>"</b></property>
+-                    <property name="use_markup">True</property>
+-                  </widget>
+-                  <packing>
+-                    <property name="expand">False</property>
+-                    <property name="fill">True</property>
+-                    <property name="position">2</property>
+-                  </packing>
+-                </child>
+-              </widget>
+-              <packing>
+-                <property name="expand">True</property>
+-                <property name="fill">True</property>
+-                <property name="position">1</property>
+-              </packing>
+-            </child>
+-          </widget>
+-          <packing>
+-            <property name="expand">True</property>
+-            <property name="fill">True</property>
+-            <property name="padding">3</property>
+-            <property name="position">3</property>
+-          </packing>
+-        </child>
+-      </widget>
+-    </child>
+-  </widget>
+-</glade-interface>
+diff --git a/files/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.py b/files/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.py
+index f6f3ad1..72cdf4f 100755
+--- a/files/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.py
++++ b/files/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.py
+@@ -3,8 +3,7 @@
+ import sys
+ import os
+ import gettext
+-import gtk
+-import gtk.glade   
++from gi.repository import Gtk
+ import pwd
+ import socket
+ 
+@@ -25,32 +24,32 @@ class MainWindow:
+         if real_name == "":
+             real_name = username        
+ 
+-        gladefile = "/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.glade"
+-        self.wTree = gtk.glade.XML(gladefile, "main_dialog")        
++        self.builder = Gtk.Builder()
++        self.builder.add_from_file("/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.ui")
+         
+-        self.window = self.wTree.get_widget("main_dialog")        
+-        self.button_cancel = self.wTree.get_widget("button_cancel")
+-        self.button_ok = self.wTree.get_widget("button_ok")                        
+-        self.entry = self.wTree.get_widget("entry_away_message")
+-        self.image = self.wTree.get_widget("image_face")
++        self.window = self.builder.get_object("main_dialog")
++        self.button_cancel = self.builder.get_object("button_cancel")
++        self.button_ok = self.builder.get_object("button_ok")
++        self.entry = self.builder.get_object("entry_away_message")
++        self.image = self.builder.get_object("image_face")
+                     
+         self.window.set_title(_("Lock screen"))
+         self.window.set_icon_from_file("/usr/lib/cinnamon-settings/data/icons/screensaver.svg")
+                 
+-        self.wTree.get_widget("label_description").set_markup("<i>%s</i>" % _("Please type an away message for the lock screen"))
+-        self.wTree.get_widget("label_away_message").set_markup("<b>%s: </b>" % real_name)        
++        self.builder.get_object("label_description").set_markup("<i>%s</i>" % _("Please type an away message for the lock screen"))
++        self.builder.get_object("label_away_message").set_markup("<b>%s: </b>" % real_name)
+         
+         if os.path.exists("%s/.face" % home_dir):
+             self.image.set_from_file("%s/.face" % home_dir)
+         else:
+             self.image.set_from_file("/usr/share/pixmaps/nobody.png")
+         
+-        self.window.connect("destroy", gtk.main_quit)
+-        self.button_cancel.connect("clicked", gtk.main_quit)
++        self.window.connect("destroy", Gtk.main_quit)
++        self.button_cancel.connect("clicked", Gtk.main_quit)
+         self.button_ok.connect('clicked', self.lock_screen)
+         self.entry.connect('activate', self.lock_screen)
+         
+-        self.wTree.get_widget("dialog-action_area1").set_focus_chain((self.button_ok, self.button_cancel))
++        self.builder.get_object("dialog-action_area1").set_focus_chain((self.button_ok, self.button_cancel))
+           
+         self.window.show()                    
+         
+@@ -60,8 +59,8 @@ class MainWindow:
+             os.system("cinnamon-screensaver-command --lock --away-message \"%s\" &" % self.entry.get_text())
+         else:
+             os.system("cinnamon-screensaver-command --lock &")
+-        gtk.main_quit()
++        Gtk.main_quit()
+    
+ if __name__ == "__main__":    
+     MainWindow()
+-    gtk.main()
++    Gtk.main()
+diff --git a/files/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.ui b/files/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.ui
+new file mode 100644
+index 0000000..30700b9
+--- /dev/null
++++ b/files/usr/lib/cinnamon-screensaver-lock-dialog/cinnamon-screensaver-lock-dialog.ui
+@@ -0,0 +1,165 @@
++<?xml version="1.0"?>
++<interface>
++  <!-- interface-requires gtk+ 2.24 -->
++  <!-- interface-naming-policy project-wide -->
++  <object class="GtkDialog" id="main_dialog">
++    <property name="can_focus">False</property>
++    <property name="border_width">6</property>
++    <property name="type_hint">dialog</property>
++    <child internal-child="vbox">
++      <object class="GtkVBox" id="dialog-vbox1">
++        <property name="visible">True</property>
++        <property name="can_focus">False</property>
++        <property name="spacing">6</property>
++        <child internal-child="action_area">
++          <object class="GtkHButtonBox" id="dialog-action_area1">
++            <property name="visible">True</property>
++            <property name="can_focus">False</property>
++            <property name="layout_style">end</property>
++            <child>
++              <object class="GtkButton" id="button_cancel">
++                <property name="label">gtk-cancel</property>
++                <property name="visible">True</property>
++                <property name="can_focus">True</property>
++                <property name="receives_default">True</property>
++                <property name="use_action_appearance">False</property>
++                <property name="use_stock">True</property>
++              </object>
++              <packing>
++                <property name="expand">False</property>
++                <property name="fill">False</property>
++                <property name="position">0</property>
++              </packing>
++            </child>
++            <child>
++              <object class="GtkButton" id="button_ok">
++                <property name="label">gtk-ok</property>
++                <property name="visible">True</property>
++                <property name="can_focus">True</property>
++                <property name="receives_default">True</property>
++                <property name="use_action_appearance">False</property>
++                <property name="use_stock">True</property>
++              </object>
++              <packing>
++                <property name="expand">False</property>
++                <property name="fill">False</property>
++                <property name="position">1</property>
++              </packing>
++            </child>
++          </object>
++          <packing>
++            <property name="expand">False</property>
++            <property name="fill">True</property>
++            <property name="padding">3</property>
++            <property name="pack_type">end</property>
++            <property name="position">0</property>
++          </packing>
++        </child>
++        <child>
++          <object class="GtkImage" id="image_face">
++            <property name="visible">True</property>
++            <property name="can_focus">False</property>
++            <property name="stock">gtk-missing-image</property>
++          </object>
++          <packing>
++            <property name="expand">False</property>
++            <property name="fill">True</property>
++            <property name="padding">3</property>
++            <property name="position">1</property>
++          </packing>
++        </child>
++        <child>
++          <object class="GtkLabel" id="label_description">
++            <property name="visible">True</property>
++            <property name="can_focus">False</property>
++            <property name="label" translatable="yes">label</property>
++          </object>
++          <packing>
++            <property name="expand">False</property>
++            <property name="fill">True</property>
++            <property name="padding">3</property>
++            <property name="position">2</property>
++          </packing>
++        </child>
++        <child>
++          <object class="GtkHBox" id="hbox1">
++            <property name="visible">True</property>
++            <property name="can_focus">False</property>
++            <child>
++              <object class="GtkLabel" id="label_away_message">
++                <property name="visible">True</property>
++                <property name="can_focus">False</property>
++                <property name="label" translatable="yes">label</property>
++              </object>
++              <packing>
++                <property name="expand">False</property>
++                <property name="fill">True</property>
++                <property name="position">0</property>
++              </packing>
++            </child>
++            <child>
++              <object class="GtkHBox" id="hbox3">
++                <property name="visible">True</property>
++                <property name="can_focus">False</property>
++                <child>
++                  <object class="GtkLabel" id="label1">
++                    <property name="visible">True</property>
++                    <property name="can_focus">False</property>
++                    <property name="label" translatable="yes"><b>"</b></property>
++                    <property name="use_markup">True</property>
++                  </object>
++                  <packing>
++                    <property name="expand">False</property>
++                    <property name="fill">True</property>
++                    <property name="position">0</property>
++                  </packing>
++                </child>
++                <child>
++                  <object class="GtkEntry" id="entry_away_message">
++                    <property name="visible">True</property>
++                    <property name="can_focus">True</property>
++                    <property name="invisible_char">&#x25CF;</property>
++                    <property name="invisible_char_set">True</property>
++                    <property name="primary_icon_activatable">False</property>
++                    <property name="secondary_icon_activatable">False</property>
++                    <property name="primary_icon_sensitive">True</property>
++                    <property name="secondary_icon_sensitive">True</property>
++                  </object>
++                  <packing>
++                    <property name="expand">True</property>
++                    <property name="fill">True</property>
++                    <property name="position">1</property>
++                  </packing>
++                </child>
++                <child>
++                  <object class="GtkLabel" id="label2">
++                    <property name="visible">True</property>
++                    <property name="can_focus">False</property>
++                    <property name="label" translatable="yes"><b>"</b></property>
++                    <property name="use_markup">True</property>
++                  </object>
++                  <packing>
++                    <property name="expand">False</property>
++                    <property name="fill">True</property>
++                    <property name="position">2</property>
++                  </packing>
++                </child>
++              </object>
++              <packing>
++                <property name="expand">True</property>
++                <property name="fill">True</property>
++                <property name="position">1</property>
++              </packing>
++            </child>
++          </object>
++          <packing>
++            <property name="expand">True</property>
++            <property name="fill">True</property>
++            <property name="padding">3</property>
++            <property name="position">3</property>
++          </packing>
++        </child>
++      </object>
++    </child>
++  </object>
++</interface>




More information about the arch-commits mailing list