[empathy: 1/2] Add a close button to Previous Conversations



commit a05517d865e823e5bd939ae5efcc497ccadef066
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date:   Mon Nov 15 12:31:36 2010 +0100

    Add a close button to Previous Conversations
    
    https://bugzilla.gnome.org/show_bug.cgi?id=595305

 libempathy-gtk/empathy-log-window.c  |   11 ++++++
 libempathy-gtk/empathy-log-window.ui |   58 +++++++++++++++++++++++++++++++++-
 2 files changed, 68 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index aa0370b..9f60064 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -96,6 +96,8 @@ static void     log_window_button_next_clicked_cb          (GtkWidget        *wi
 							    EmpathyLogWindow *window);
 static void     log_window_button_previous_clicked_cb      (GtkWidget        *widget,
 							    EmpathyLogWindow *window);
+static void     log_window_button_close_clicked_cb         (GtkWidget        *widget,
+							    EmpathyLogWindow *window);
 static void     log_window_chats_changed_cb                (GtkTreeSelection *selection,
 							    EmpathyLogWindow *window);
 static void     log_window_chats_populate                  (EmpathyLogWindow *window);
@@ -263,6 +265,8 @@ empathy_log_window_show (TpAccount  *account,
 			      "entry_find", "activate", log_window_entry_find_activate_cb,
 			      "button_previous", "clicked", log_window_button_previous_clicked_cb,
 			      "button_next", "clicked", log_window_button_next_clicked_cb,
+			      "button_close", "clicked", log_window_button_close_clicked_cb,
+			      "button_close2", "clicked", log_window_button_close_clicked_cb,
 			      "button_find", "clicked", log_window_button_find_clicked_cb,
 			      "entry_chats", "changed", log_window_entry_chats_changed_cb,
 			      "entry_chats", "activate", log_window_entry_chats_activate_cb,
@@ -759,6 +763,13 @@ log_window_button_previous_clicked_cb (GtkWidget       *widget,
 	}
 }
 
+static void
+log_window_button_close_clicked_cb (GtkWidget *widget,
+				    EmpathyLogWindow *window)
+{
+	gtk_widget_destroy (window->window);
+}
+
 /*
  * Chats Code
  */
diff --git a/libempathy-gtk/empathy-log-window.ui b/libempathy-gtk/empathy-log-window.ui
index 5ce9300..1f99cdd 100644
--- a/libempathy-gtk/empathy-log-window.ui
+++ b/libempathy-gtk/empathy-log-window.ui
@@ -155,6 +155,22 @@
                             <property name="position">1</property>
                           </packing>
                         </child>
+                        <child>
+                          <object class="GtkButton" id="button_close">
+                            <property name="label">gtk-close</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_stock">True</property>
+                            <property name="focus_on_click">False</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="pack_type">end</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -173,6 +189,12 @@
                 <property name="position">1</property>
               </packing>
             </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
           </object>
         </child>
         <child type="tab">
@@ -188,7 +210,7 @@
           <object class="GtkTable" id="table7">
             <property name="visible">True</property>
             <property name="border_width">12</property>
-            <property name="n_rows">2</property>
+            <property name="n_rows">3</property>
             <property name="n_columns">2</property>
             <property name="column_spacing">6</property>
             <property name="row_spacing">6</property>
@@ -297,6 +319,40 @@
                 <property name="y_options">GTK_FILL</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkHBox" id="hbox2">
+                <property name="visible">True</property>
+                <property name="spacing">12</property>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <object class="GtkButton" id="button_close2">
+                    <property name="label">gtk-close</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="pack_type">end</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
           </object>
           <packing>
             <property name="position">1</property>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]