[Xfce4-commits] [apps/xfce4-screensaver] 366/425: Drop leave-message feature

noreply at xfce.org noreply at xfce.org
Mon Oct 15 01:53:33 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit cf8fceb4fb3a70263f620d0edbd2b9db01237d44
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Sun Oct 7 00:31:40 2018 +0200

    Drop leave-message feature
    
    Also cleanup unneeded widgetry (GtkNotebooks etc).
---
 configure.ac                |  16 --
 data/lock-dialog-default.ui | 522 ++++++++++++++++----------------------------
 src/Makefile.am             |   2 -
 src/gs-lock-plug.c          | 154 -------------
 4 files changed, 188 insertions(+), 506 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9c667a3..a321123 100644
--- a/configure.ac
+++ b/configure.ac
@@ -971,21 +971,6 @@ if test x$with_kbd_layout_indicator != xno; then
 fi
 
 dnl ---------------------------------------------------------------------------
-dnl libnotify
-dnl ---------------------------------------------------------------------------
-
-have_libnotify=no
-AC_ARG_WITH(libnotify,[  --without-libnotify         disable libnotify support])
-if test x$with_libnotify != xno; then
-	PKG_CHECK_MODULES(LIBNOTIFY, libnotify > 0.7.0, have_libnotify=yes, have_libnotify=no)
-fi
-if test "x$have_libnotify" = "xyes"; then
-  AC_SUBST(LIBNOTIFY_CFLAGS)
-  AC_SUBST(LIBNOTIFY_LIBS)
-  AC_DEFINE(WITH_LIBNOTIFY, 1, [Define for libnotify support])
-fi
-
-dnl ---------------------------------------------------------------------------
 dnl Finish
 dnl ---------------------------------------------------------------------------
 
@@ -1174,7 +1159,6 @@ echo "
         Show keyboard indicator:  ${with_kbd_layout_indicator}
         systemd support:          ${use_systemd}
         ConsoleKit support:       ${use_console_kit}
-        libnotify support:        ${have_libnotify}
         PAM support:              ${have_pam}
         bsd_auth(3) support:      ${have_bsdauth}
         Have shadow passwords:    ${have_shadow}
diff --git a/data/lock-dialog-default.ui b/data/lock-dialog-default.ui
index c032fa7..5cff1fe 100644
--- a/data/lock-dialog-default.ui
+++ b/data/lock-dialog-default.ui
@@ -7,175 +7,154 @@
     <property name="can_focus">False</property>
     <property name="orientation">vertical</property>
     <child>
-      <object class="GtkNotebook" id="notebook">
+      <object class="GtkBox" id="vbox2">
         <property name="name">login_window</property>
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="show_tabs">False</property>
-        <property name="show_border">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">6</property>
         <child>
-          <object class="GtkBox" id="vbox2">
+          <object class="GtkBox" id="vbox4">
+            <property name="name">content_frame</property>
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="orientation">vertical</property>
+            <property name="margin_left">18</property>
+            <property name="margin_right">18</property>
+            <property name="margin_top">12</property>
             <property name="spacing">6</property>
+            <property name="homogeneous">True</property>
             <child>
-              <object class="GtkBox" id="vbox4">
-                <property name="name">content_frame</property>
+              <object class="GtkLabel" id="auth-date-label">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <object class="GtkLabel" id="auth-time-label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label"><span size="xx-large" weight="ultrabold">%s</span></property>
-                    <property name="use_markup">True</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="auth-date-label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label"><span size="large">%s</span></property>
-                    <property name="use_markup">True</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
+                <property name="label">%s</property>
+                <property name="use_markup">True</property>
+                <property name="xalign">0</property>
               </object>
               <packing>
-                <property name="expand">True</property>
+                <property name="expand">False</property>
                 <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
-              <object class="GtkImage" id="auth-face-image">
+              <object class="GtkLabel" id="auth-time-label">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="valign">end</property>
+                <property name="label">%s</property>
+                <property name="use_markup">True</property>
+                <property name="xalign">1</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>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkImage" id="auth-face-image">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="valign">end</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="vbox3">
+            <property name="name">content_frame</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
             <child>
-              <object class="GtkBox" id="vbox3">
-                <property name="name">content_frame</property>
+              <object class="GtkLabel" id="auth-realname-label">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <object class="GtkLabel" id="auth-realname-label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label"><span size="x-large">%R</span></property>
-                    <property name="use_markup">True</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="auth-username-label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label"><span size="small">%U on %h</span></property>
-                    <property name="use_markup">True</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
+                <property name="label"><span size="x-large">%R</span></property>
+                <property name="use_markup">True</property>
               </object>
               <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="status-message-label">
+              <object class="GtkLabel" id="auth-username-label">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="wrap">True</property>
+                <property name="label"><span size="small">%U on %h</span></property>
+                <property name="use_markup">True</property>
               </object>
               <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">3</property>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="status-message-label">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="wrap">True</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="auth-prompt-box">
+            <property name="name">content_frame</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkLabel" id="auth-prompt-label">
+                <property name="can_focus">False</property>
+                <property name="xalign">0.5</property>
+                <property name="yalign">0.5</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
               </packing>
             </child>
             <child>
-              <object class="GtkBox" id="auth-prompt-box">
-                <property name="name">content_frame</property>
+              <object class="GtkBox" id="hbox1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="orientation">vertical</property>
+                <property name="spacing">6</property>
                 <child>
-                  <object class="GtkLabel" id="auth-prompt-label">
-                    <property name="can_focus">False</property>
-                    <property name="xalign">0.5</property>
-                    <property name="yalign">0.5</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkBox" id="hbox1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">6</property>
-                    <child>
-                      <object class="GtkEntry" id="auth-prompt-entry">
-                        <property name="can_focus">True</property>
-                        <property name="margin_left">12</property>
-                        <property name="margin_right">12</property>
-                        <property name="visibility">False</property>
-                        <property name="activates_default">True</property>
-                        <property name="primary_icon_activatable">False</property>
-                        <property name="secondary_icon_activatable">False</property>
-                        <property name="placeholder_text" translatable="yes">Enter your password</property>
-                        <property name="input_purpose">password</property>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkBox" id="auth-prompt-kbd-layout-indicator">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <child>
-                          <placeholder/>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
+                  <object class="GtkEntry" id="auth-prompt-entry">
+                    <property name="can_focus">True</property>
+                    <property name="margin_left">18</property>
+                    <property name="margin_right">18</property>
+                    <property name="visibility">False</property>
+                    <property name="activates_default">True</property>
+                    <property name="primary_icon_activatable">False</property>
+                    <property name="secondary_icon_activatable">False</property>
+                    <property name="placeholder_text" translatable="yes">Enter your password</property>
+                    <property name="input_purpose">password</property>
                   </object>
                   <packing>
                     <property name="expand">True</property>
@@ -184,13 +163,16 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkLabel" id="auth-capslock-label">
+                  <object class="GtkBox" id="auth-prompt-kbd-layout-indicator">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
-                    <property name="fill">False</property>
+                    <property name="fill">True</property>
                     <property name="position">2</property>
                   </packing>
                 </child>
@@ -198,263 +180,135 @@
               <packing>
                 <property name="expand">True</property>
                 <property name="fill">True</property>
-                <property name="position">4</property>
+                <property name="position">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="auth-status-label">
+              <object class="GtkLabel" id="auth-capslock-label">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
               </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">5</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkBox">
-                <property name="name">buttonbox_frame</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <object class="GtkButtonBox" id="auth-action-area">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="margin_left">12</property>
-                    <property name="margin_right">12</property>
-                    <property name="margin_top">6</property>
-                    <property name="margin_bottom">24</property>
-                    <property name="spacing">6</property>
-                    <property name="layout_style">end</property>
-                    <child>
-                      <object class="GtkButton" id="auth-note-button">
-                        <property name="label" translatable="yes">_Leave Message</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="can_default">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">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="auth-switch-button">
-                        <property name="label" translatable="yes">_Switch User</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="can_default">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkButton" id="auth-logout-button">
-                        <property name="label" translatable="yes">_Log Out</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="can_default">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkButton" id="auth-cancel-button">
-                        <property name="label" translatable="yes">_Cancel</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="can_default">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkButton" id="auth-unlock-button">
-                        <property name="label" translatable="yes">_Unlock</property>
-                        <property name="name">login_button</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="can_default">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">4</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">6</property>
+                <property name="position">2</property>
               </packing>
             </child>
           </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">4</property>
+          </packing>
         </child>
-        <child type="tab">
-          <object class="GtkLabel" id="label1">
+        <child>
+          <object class="GtkLabel" id="auth-status-label">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
           </object>
           <packing>
-            <property name="tab_fill">False</property>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">5</property>
           </packing>
         </child>
         <child>
-          <object class="GtkBox" id="note-tab">
+          <object class="GtkBox">
+            <property name="name">buttonbox_frame</property>
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="orientation">vertical</property>
-            <property name="spacing">10</property>
             <child>
-              <object class="GtkLabel" id="note-tab-label">
+              <object class="GtkButtonBox" id="auth-action-area">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="margin_left">12</property>
-                <property name="margin_top">12</property>
-                <property name="label" translatable="yes"><b>Leave a message for %R:</b></property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkScrolledWindow" id="scrolledwindow1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="margin_left">12</property>
                 <property name="margin_right">12</property>
-                <property name="shadow_type">in</property>
+                <property name="margin_top">6</property>
+                <property name="margin_bottom">24</property>
+                <property name="spacing">6</property>
+                <property name="layout_style">end</property>
                 <child>
-                  <object class="GtkTextView" id="note-text-view">
+                  <object class="GtkButton" id="auth-switch-button">
+                    <property name="label" translatable="yes">_Switch User</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="wrap_mode">word</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="can_default">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">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">True</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkBox">
-                <property name="name">buttonbox_frame</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="orientation">vertical</property>
                 <child>
-                  <object class="GtkButtonBox" id="hbuttonbox1">
+                  <object class="GtkButton" id="auth-logout-button">
+                    <property name="label" translatable="yes">_Log Out</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="margin_left">12</property>
-                    <property name="margin_right">12</property>
-                    <property name="margin_top">6</property>
-                    <property name="margin_bottom">24</property>
-                    <property name="spacing">6</property>
-                    <property name="layout_style">end</property>
-                    <child>
-                      <object class="GtkButton" id="note-cancel-button">
-                        <property name="label">_Cancel</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="can_default">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">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="note-ok-button">
-                        <property name="label">_Save</property>
-                        <property name="name">login_button</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="can_default">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
+                    <property name="can_focus">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="can_default">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="auth-cancel-button">
+                    <property name="label" translatable="yes">_Cancel</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="focus_on_click">False</property>
+                    <property name="can_default">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="auth-unlock-button">
+                    <property name="label" translatable="yes">_Unlock</property>
+                    <property name="name">login_button</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="can_default">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">4</property>
                   </packing>
                 </child>
               </object>
               <packing>
                 <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child type="tab">
-          <object class="GtkLabel" id="label9">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-          </object>
-          <packing>
-            <property name="position">1</property>
-            <property name="tab_fill">False</property>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">6</property>
           </packing>
         </child>
       </object>
       <packing>
-        <property name="expand">True</property>
+        <property name="expand">False</property>
         <property name="fill">True</property>
         <property name="position">0</property>
       </packing>
diff --git a/src/Makefile.am b/src/Makefile.am
index 33487b4..a23ed54 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,7 +30,6 @@ AM_CPPFLAGS =							\
 	$(DEBUG_CFLAGS)						\
 	$(DBUS_CFLAGS)						\
 	$(LIBXFCEKBDUI_CFLAGS)					\
-	$(LIBNOTIFY_CFLAGS)					\
 	$(LIBXKLAVIER_CFLAGS)				\
 	$(SYSTEMD_CFLAGS)					\
 	$(NULL)
@@ -206,7 +205,6 @@ xfce4_screensaver_dialog_LDADD =	\
 	$(SAVER_LIBS)			\
 	$(AUTH_LIBS)			\
 	$(LIBXFCEKBDUI_LIBS)		\
-	$(LIBNOTIFY_LIBS)		\
 	$(NULL)
 
 BUILT_SOURCES = 		\
diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c
index b081f8c..40627ed 100644
--- a/src/gs-lock-plug.c
+++ b/src/gs-lock-plug.c
@@ -46,10 +46,6 @@
 #include "xfcekbd-indicator.h"
 #endif
 
-#ifdef WITH_LIBNOTIFY
-#include <libnotify/notify.h>
-#endif
-
 #include "gs-lock-plug.h"
 
 #include "gs-debug.h"
@@ -64,9 +60,6 @@
 #define GDM_FLEXISERVER_COMMAND "gdmflexiserver"
 #define GDM_FLEXISERVER_ARGS    "--startnew Standard"
 
-/* same as SMS ;) */
-#define NOTE_BUFFER_MAX_CHARS 160
-
 enum
 {
     AUTH_PAGE = 0,
@@ -84,7 +77,6 @@ struct GSLockPlugPrivate
 	GtkWidget   *vbox;
 	GtkWidget   *auth_action_area;
 
-	GtkWidget   *notebook;
 	GtkWidget   *auth_face_image;
 	GtkWidget   *auth_time_label;
 	GtkWidget   *auth_date_label;
@@ -101,18 +93,11 @@ struct GSLockPlugPrivate
 	GtkWidget   *auth_switch_button;
 	GtkWidget   *auth_cancel_button;
 	GtkWidget   *auth_logout_button;
-	GtkWidget   *auth_note_button;
-	GtkWidget   *note_tab;
-	GtkWidget   *note_tab_label;
-	GtkWidget   *note_text_view;
-	GtkWidget   *note_ok_button;
-	GtkWidget   *note_cancel_button;
 
 	GtkWidget   *auth_prompt_kbd_layout_indicator;
 
 	gboolean     caps_lock_on;
 	gboolean     switch_enabled;
-	gboolean     leave_note_enabled;
 	gboolean     logout_enabled;
 	char        *logout_command;
 	char        *status_message;
@@ -1346,73 +1331,6 @@ clear_clipboards (GSLockPlug *plug)
 }
 
 static void
-take_note (GtkButton  *button,
-           GSLockPlug *plug)
-{
-	int page;
-
-	page = gtk_notebook_page_num (GTK_NOTEBOOK (plug->priv->notebook), plug->priv->note_tab);
-	gtk_notebook_set_current_page (GTK_NOTEBOOK (plug->priv->notebook), page);
-	/* this counts as activity so restart the timer */
-	restart_cancel_timeout (plug);
-}
-
-static void
-submit_note (GtkButton  *button,
-             GSLockPlug *plug)
-{
-#ifdef WITH_LIBNOTIFY
-	char               *text;
-	char                summary[128];
-	char               *escaped_text;
-	GtkTextBuffer      *buffer;
-	GtkTextIter         start, end;
-	time_t              t;
-	struct tm          *tmp;
-	NotifyNotification *note;
-
-	gtk_notebook_set_current_page (GTK_NOTEBOOK (plug->priv->notebook), AUTH_PAGE);
-	buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (plug->priv->note_text_view));
-	gtk_text_buffer_get_bounds (buffer, &start, &end);
-	text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
-	gtk_text_buffer_set_text (buffer, "", 0);
-	escaped_text = g_markup_escape_text (text, -1);
-
-	t = time (NULL);
-	tmp = localtime (&t);
-	strftime (summary, 128, "%X", tmp);
-
-	note = notify_notification_new (summary, escaped_text, NULL);
-	notify_notification_set_timeout (note, NOTIFY_EXPIRES_NEVER);
-	notify_notification_show (note, NULL);
-	g_object_unref (note);
-
-	g_free (text);
-	g_free (escaped_text);
-
-	gs_lock_plug_response (plug, GS_LOCK_PLUG_RESPONSE_CANCEL);
-#endif /* WITH_LIBNOTIFY */
-}
-
-static void
-cancel_note (GtkButton  *button,
-             GSLockPlug *plug)
-{
-	GtkTextBuffer *buffer;
-
-	gtk_notebook_set_current_page (GTK_NOTEBOOK (plug->priv->notebook), AUTH_PAGE);
-	buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (plug->priv->note_text_view));
-	gtk_text_buffer_set_text (buffer, "", 0);
-
-	/* this counts as activity so restart the timer */
-	restart_cancel_timeout (plug);
-
-	gtk_window_set_default (GTK_WINDOW (plug), plug->priv->auth_unlock_button);
-
-	clear_clipboards (plug);
-}
-
-static void
 logout_button_clicked (GtkButton  *button,
                        GSLockPlug *plug)
 {
@@ -1832,7 +1750,6 @@ create_page_one (GSLockPlug *plug)
 	                       GTK_ALIGN_CENTER);
 	gtk_widget_set_valign (GTK_WIDGET (vbox),
 	                       GTK_ALIGN_CENTER);
-	gtk_notebook_append_page (GTK_NOTEBOOK (plug->priv->notebook), vbox, NULL);
 
 	vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 	gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 0);
@@ -2017,7 +1934,6 @@ load_theme (GSLockPlug *plug)
 	gtk_container_add (GTK_CONTAINER (plug), lock_dialog);
 
 	plug->priv->vbox = NULL;
-	plug->priv->notebook = GTK_WIDGET (gtk_builder_get_object(builder, "notebook"));
 
 	plug->priv->auth_face_image = GTK_WIDGET (gtk_builder_get_object(builder, "auth-face-image"));
 	plug->priv->auth_action_area = GTK_WIDGET (gtk_builder_get_object(builder, "auth-action-area"));
@@ -2034,12 +1950,6 @@ load_theme (GSLockPlug *plug)
 	plug->priv->auth_cancel_button = GTK_WIDGET (gtk_builder_get_object(builder, "auth-cancel-button"));
 	plug->priv->auth_logout_button = GTK_WIDGET (gtk_builder_get_object(builder, "auth-logout-button"));
 	plug->priv->auth_switch_button = GTK_WIDGET (gtk_builder_get_object(builder, "auth-switch-button"));
-	plug->priv->auth_note_button = GTK_WIDGET (gtk_builder_get_object(builder, "auth-note-button"));
-	plug->priv->note_tab = GTK_WIDGET (gtk_builder_get_object(builder, "note-tab"));
-	plug->priv->note_tab_label = GTK_WIDGET (gtk_builder_get_object(builder, "note-tab-label"));
-	plug->priv->note_ok_button = GTK_WIDGET (gtk_builder_get_object(builder, "note-ok-button"));
-	plug->priv->note_text_view = GTK_WIDGET (gtk_builder_get_object(builder, "note-text-view"));
-	plug->priv->note_cancel_button = GTK_WIDGET (gtk_builder_get_object(builder, "note-cancel-button"));
 
 	/* Placeholder for the keyboard indicator */
 	plug->priv->auth_prompt_kbd_layout_indicator = GTK_WIDGET (gtk_builder_get_object(builder, "auth-prompt-kbd-layout-indicator"));
@@ -2051,10 +1961,6 @@ load_theme (GSLockPlug *plug)
 	{
 		gtk_widget_set_no_show_all (plug->priv->auth_switch_button, TRUE);
 	}
-	if (plug->priv->auth_note_button != NULL)
-	{
-		gtk_widget_set_no_show_all (plug->priv->auth_note_button, TRUE);
-	}
 
 	date_time_update (plug);
 	gtk_widget_show_all (lock_dialog);
@@ -2075,16 +1981,6 @@ delete_handler (GSLockPlug  *plug,
 }
 
 static void
-on_note_text_buffer_changed (GtkTextBuffer *buffer,
-                             GSLockPlug    *plug)
-{
-	int len;
-
-	len = gtk_text_buffer_get_char_count (buffer);
-	gtk_widget_set_sensitive (plug->priv->note_ok_button, len <= NOTE_BUFFER_MAX_CHARS);
-}
-
-static void
 gs_lock_plug_init (GSLockPlug *plug)
 {
 	gs_profile_start (NULL);
@@ -2093,13 +1989,6 @@ gs_lock_plug_init (GSLockPlug *plug)
 
 	clear_clipboards (plug);
 
-#ifdef WITH_LIBNOTIFY
-	notify_init ("xfce4-screensaver-dialog");
-	plug->priv->leave_note_enabled = TRUE;
-#else
-	plug->priv->leave_note_enabled = FALSE;
-#endif
-
 	GtkStyleContext *context;
 
 	context = gtk_widget_get_style_context (GTK_WIDGET (plug));
@@ -2112,13 +2001,6 @@ gs_lock_plug_init (GSLockPlug *plug)
 		plug->priv->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 		gtk_container_add (GTK_CONTAINER (plug), plug->priv->vbox);
 
-		/* Notebook */
-
-		plug->priv->notebook = gtk_notebook_new ();
-		gtk_notebook_set_show_tabs (GTK_NOTEBOOK (plug->priv->notebook), FALSE);
-		gtk_notebook_set_show_border (GTK_NOTEBOOK (plug->priv->notebook), FALSE);
-		gtk_box_pack_start (GTK_BOX (plug->priv->vbox), plug->priv->notebook, TRUE, TRUE, 0);
-
 		/* Page 1 */
 
 		create_page_one (plug);
@@ -2128,13 +2010,6 @@ gs_lock_plug_init (GSLockPlug *plug)
 	}
 	plug->priv->datetime_timeout_id = g_timeout_add_seconds (1, (GSourceFunc) date_time_update, plug);
 
-	if (plug->priv->note_text_view != NULL)
-	{
-		GtkTextBuffer *buffer;
-		buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (plug->priv->note_text_view));
-		g_signal_connect (buffer, "changed", G_CALLBACK (on_note_text_buffer_changed), plug);
-	}
-
 	/* Layout indicator */
 #ifdef WITH_KBD_LAYOUT_INDICATOR
 	if (plug->priv->auth_prompt_kbd_layout_indicator != NULL)
@@ -2166,17 +2041,6 @@ gs_lock_plug_init (GSLockPlug *plug)
 	}
 #endif
 
-	if (plug->priv->auth_note_button != NULL)
-	{
-		if (plug->priv->leave_note_enabled)
-		{
-			gtk_widget_show_all (plug->priv->auth_note_button);
-		}
-		else
-		{
-			gtk_widget_hide (plug->priv->auth_note_button);
-		}
-	}
 	if (plug->priv->auth_switch_button != NULL)
 	{
 		if (plug->priv->switch_enabled)
@@ -2245,21 +2109,6 @@ gs_lock_plug_init (GSLockPlug *plug)
 		                  G_CALLBACK (switch_user_button_clicked), plug);
 	}
 
-	if (plug->priv->auth_note_button != NULL)
-	{
-		g_signal_connect (plug->priv->auth_note_button, "clicked",
-		                  G_CALLBACK (take_note), plug);
-		g_signal_connect (plug->priv->note_ok_button, "clicked",
-		                  G_CALLBACK (submit_note), plug);
-		g_signal_connect (plug->priv->note_cancel_button, "clicked",
-		                  G_CALLBACK (cancel_note), plug);
-	}
-
-	if (plug->priv->note_tab_label != NULL)
-	{
-		expand_string_for_label (plug->priv->note_tab_label);
-	}
-
 	if (plug->priv->auth_logout_button != NULL)
 	{
 		g_signal_connect (plug->priv->auth_logout_button, "clicked",
@@ -2288,9 +2137,6 @@ gs_lock_plug_finalize (GObject *object)
 	remove_response_idle (plug);
 	remove_cancel_timeout (plug);
 	remove_datetime_timeout (plug);
-#ifdef WITH_LIBNOTIFY
-	notify_uninit ();
-#endif
 
 	G_OBJECT_CLASS (gs_lock_plug_parent_class)->finalize (object);
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list