[tracker/gtk3: 446/447] tracker-needle: Use GTK+3



commit aeef04e941a5fd508f6b795d86589c28f92cded0
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Apr 14 14:51:58 2011 +0200

    tracker-needle: Use GTK+3
    
    * GtkComboBoxText is now used
    * GtkDialog::has-separator usage is removed
    * Tracker's cell renderer isn't actually used, removed.

 configure.ac                                       |    2 +-
 src/tracker-needle/Makefile.am                     |    3 +-
 src/tracker-needle/tracker-cell-renderer-text.vala |  125 --------------------
 src/tracker-needle/tracker-needle.ui               |   52 ++++++--
 src/tracker-needle/tracker-needle.vala             |    4 +-
 src/tracker-needle/tracker-stats.vala              |    1 -
 6 files changed, 44 insertions(+), 143 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 417222d..575cbde 100644
--- a/configure.ac
+++ b/configure.ac
@@ -423,7 +423,7 @@ TRACKER_NEEDLE_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                          gio-unix-2.0 >= $GLIB_REQUIRED
                          gthread-2.0  >= $GLIB_REQUIRED
                          gmodule-2.0  >= $GLIB_REQUIRED
-                         gtk+-2.0     >= $GTK_REQUIRED"
+                         gtk+-3.0     >= $GTK_REQUIRED"
 
 PKG_CHECK_MODULES(TRACKER_NEEDLE, [$TRACKER_NEEDLE_REQUIRED],
                   [have_tracker_needle=yes],
diff --git a/src/tracker-needle/Makefile.am b/src/tracker-needle/Makefile.am
index cdbf4c1..5dbc7eb 100644
--- a/src/tracker-needle/Makefile.am
+++ b/src/tracker-needle/Makefile.am
@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.decl
 bin_PROGRAMS = tracker-needle
 
 AM_VALAFLAGS = \
-	--pkg gtk+-2.0 --pkg gio-2.0 \
+	--pkg gtk+-3.0 --pkg gio-2.0 \
 	$(BUILD_VALAFLAGS) \
 	$(top_srcdir)/src/libtracker-sparql/tracker-sparql-$(TRACKER_API_VERSION).vapi \
 	config.vapi
@@ -25,7 +25,6 @@ LDADD =                                            \
 	$(TRACKER_NEEDLE_LIBS)
 
 tracker_needle_SOURCES =                           \
-	tracker-cell-renderer-text.vala                \
 	tracker-history.vala                           \
 	tracker-query.vala                             \
 	tracker-result-store.vala                      \
diff --git a/src/tracker-needle/tracker-needle.ui b/src/tracker-needle/tracker-needle.ui
index 0edd39a..f0f9142 100644
--- a/src/tracker-needle/tracker-needle.ui
+++ b/src/tracker-needle/tracker-needle.ui
@@ -1,8 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy project-wide -->
+  <object class="GtkListStore" id="liststore_search">
+    <columns>
+      <!-- column-name text -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
   <object class="GtkWindow" id="window_needle">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Desktop Search</property>
     <property name="default_width">720</property>
     <property name="default_height">480</property>
@@ -10,13 +16,17 @@
     <child>
       <object class="GtkVBox" id="vbox_main">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <child>
           <object class="GtkToolbar" id="toolbar_main">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <child>
               <object class="GtkRadioToolButton" id="toolbutton_view_categories">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Display results by category, for example, Music, Videos, Applications, etc.</property>
+                <property name="use_action_appearance">False</property>
                 <property name="is_important">True</property>
                 <property name="use_underline">True</property>
                 <property name="icon_name">help-faq</property>
@@ -31,7 +41,9 @@
             <child>
               <object class="GtkRadioToolButton" id="toolbutton_view_filelist">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Display results by files found in a list</property>
+                <property name="use_action_appearance">False</property>
                 <property name="is_important">True</property>
                 <property name="use_underline">True</property>
                 <property name="icon_name">document-open</property>
@@ -46,7 +58,9 @@
             <child>
               <object class="GtkRadioToolButton" id="toolbutton_view_icons">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Display found images</property>
+                <property name="use_action_appearance">False</property>
                 <property name="is_important">True</property>
                 <property name="use_underline">True</property>
                 <property name="icon_name">emblem-photos</property>
@@ -60,6 +74,7 @@
             <child>
               <object class="GtkSeparatorToolItem" id="separator_secondary">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -69,7 +84,9 @@
             <child>
               <object class="GtkRadioToolButton" id="toolbutton_find_in_contents">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Find search criteria inside files</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="stock_id">gtk-find</property>
                 <property name="active">True</property>
@@ -82,7 +99,9 @@
             <child>
               <object class="GtkRadioToolButton" id="toolbutton_find_in_titles">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Find search criteria in file titles</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="stock_id">gtk-bold</property>
                 <property name="group">toolbutton_find_in_contents</property>
@@ -107,6 +126,7 @@
             <child>
               <object class="GtkSeparatorToolItem" id="&lt;separator&gt;">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -116,10 +136,13 @@
             <child>
               <object class="GtkToolItem" id="toolitem_search_label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="is_important">True</property>
                 <child>
                   <object class="GtkLabel" id="label_search">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label" translatable="yes">_Search:</property>
                     <property name="use_underline">True</property>
                   </object>
@@ -133,20 +156,23 @@
             <child>
               <object class="GtkToolItem" id="toolitem_search_entry">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="use_action_appearance">False</property>
                 <property name="is_important">True</property>
                 <child>
                   <object class="GtkAlignment" id="alignment1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="yscale">0</property>
                     <property name="left_padding">4</property>
                     <property name="right_padding">4</property>
                     <child>
-                      <object class="GtkComboBoxEntry" id="comboboxentry_search">
+                      <object class="GtkComboBoxText" id="comboboxtext_search">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="has_focus">True</property>
+                        <property name="has_entry">True</property>
                         <property name="model">liststore_search</property>
-                        <property name="text_column">0</property>
                         <accelerator key="s" signal="grab-focus" modifiers="GDK_CONTROL_MASK"/>
                         <accelerator key="f" signal="grab-focus" modifiers="GDK_CONTROL_MASK"/>
                       </object>
@@ -161,10 +187,9 @@
             </child>
             <child>
               <object class="GtkToolItem" id="toolcustom_spinner">
+                <property name="can_focus">False</property>
                 <property name="border_width">8</property>
-                <child>
-                  <placeholder/>
-                </child>
+                <property name="use_action_appearance">False</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -174,6 +199,7 @@
             <child>
               <object class="GtkSeparatorToolItem" id="&lt;separator&gt;1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -183,7 +209,9 @@
             <child>
               <object class="GtkToggleToolButton" id="toolbutton_show_tags">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Tags</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="icon_name">emblem-default</property>
               </object>
@@ -195,7 +223,9 @@
             <child>
               <object class="GtkToolButton" id="toolbutton_show_stats">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="tooltip_text" translatable="yes">Show statistics about the data stored</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
                 <property name="stock_id">gtk-about</property>
               </object>
@@ -207,28 +237,26 @@
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">0</property>
           </packing>
         </child>
         <child>
           <object class="GtkHBox" id="hbox_view">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="spacing">6</property>
             <child>
               <placeholder/>
             </child>
           </object>
           <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
       </object>
     </child>
   </object>
-  <object class="GtkListStore" id="liststore_search">
-    <columns>
-      <!-- column-name text -->
-      <column type="gchararray"/>
-    </columns>
-  </object>
 </interface>
diff --git a/src/tracker-needle/tracker-needle.vala b/src/tracker-needle/tracker-needle.vala
index e15c840..c430b37 100644
--- a/src/tracker-needle/tracker-needle.vala
+++ b/src/tracker-needle/tracker-needle.vala
@@ -37,7 +37,7 @@ public class Tracker.Needle {
 	private ToggleToolButton find_in_titles;
 	private ToggleToolButton find_in_all;
 	private ToolItem search_entry;
-	private ComboBoxEntry search_list;
+	private ComboBoxText search_list;
 	private Entry search;
 	private Spinner spinner;
 	private ToolItem spinner_shell;
@@ -262,7 +262,7 @@ public class Tracker.Needle {
 		find_in_all.toggled.connect (find_in_toggled);
 
 		search_entry = builder.get_object ("toolitem_search_entry") as ToolItem;
-		search_list = builder.get_object ("comboboxentry_search") as ComboBoxEntry;
+		search_list = builder.get_object ("comboboxtext_search") as ComboBoxText;
 		search = search_list.get_child () as Entry;
 		search.changed.connect (search_changed);
 		search.activate.connect (search_activated);
diff --git a/src/tracker-needle/tracker-stats.vala b/src/tracker-needle/tracker-stats.vala
index fb46090..9cbc433 100644
--- a/src/tracker-needle/tracker-stats.vala
+++ b/src/tracker-needle/tracker-stats.vala
@@ -32,7 +32,6 @@ public class Tracker.Stats : Dialog {
 
 	public Stats () {
 		this.title = "Statistics";
-		this.has_separator = false;
 		this.border_width = 12;
 		this.resizable = false;
 



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