~niels-avonds/granite/timepicker

« back to all changes in this revision

Viewing changes to lib/Widgets/Entries.vala

  • Committer: Victor Eduardo
  • Author(s): Mario Guerriero
  • Date: 2012-03-24 02:36:31 UTC
  • mfrom: (145.1.1 granite)
  • Revision ID: victoreduardm@gmail.com-20120324023631-rcezaksk17p26c14
[API] Granite.Widgets.SearchBar: add search_icon_pressed signal [Type: void]

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
         * use changed () method.
76
76
         **/
77
77
        public signal void text_changed_pause (string text);
78
 
 
 
78
        
 
79
        /**
 
80
         * search_icon_pressed () signal is emitted after a short delay,
 
81
         * which depends on the SearchBar's icon.
 
82
         * It can be useful to show something on the icon press,
 
83
         * we can show a PopOver, for example.
 
84
         **/
 
85
        public signal void search_icon_pressed ();
 
86
        
79
87
        public SearchBar (string hint_string) {
80
88
        
81
89
            base (hint_string);
133
141
                set_icon_from_stock (position, null);
134
142
                is_searching = true;
135
143
            } else {
 
144
                var pix = get_icon_pixbuf (EntryIconPosition.PRIMARY);
 
145
                Gtk.Image icon = new Gtk.Image.from_pixbuf (pix);
 
146
                search_icon_pressed ();
136
147
                if (!is_focus) {
137
148
                    is_searching = false;
138
149
                    hint ();
161
172
    }
162
173
 
163
174
}
164