~ubuntu-branches/ubuntu/hardy/gedit/hardy-proposed

« back to all changes in this revision

Viewing changes to gedit/gedit-commands-search.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-07-11 14:06:41 UTC
  • mto: This revision was merged to the branch mainline in revision 19.
  • Revision ID: james.westby@ubuntu.com-20060711140641-9ale6eu5anm0iftf
Tags: upstream-2.15.4
ImportĀ upstreamĀ versionĀ 2.15.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 * list of people on the gedit Team.
28
28
 * See the ChangeLog files for a list of changes.
29
29
 *
30
 
 * $Id: gedit-commands-search.c,v 1.11 2006/05/29 10:14:28 paolo Exp $
 
30
 * $Id: gedit-commands-search.c,v 1.12 2006/06/18 09:05:20 paolo Exp $
31
31
 */
32
32
 
33
33
#ifdef HAVE_CONFIG_H
745
745
        if (active_view == NULL)
746
746
                return;
747
747
 
 
748
        /* Focus the view if needed: we need to focus the view otherwise 
 
749
           activating the binding for goto line has no effect */
 
750
        gtk_widget_grab_focus (GTK_WIDGET (active_view));
 
751
 
 
752
 
748
753
        /* goto line is builtin in GeditView, just activate
749
754
         * the corrisponding binding.
750
755
         */
752
757
                               GDK_i,
753
758
                               GDK_CONTROL_MASK);
754
759
}
 
760
 
 
761
void
 
762
_gedit_cmd_search_interactive_search (GtkAction   *action,
 
763
                                      GeditWindow *window)
 
764
{
 
765
        GeditView *active_view;
 
766
 
 
767
        gedit_debug (DEBUG_COMMANDS);
 
768
 
 
769
        active_view = gedit_window_get_active_view (window);
 
770
        if (active_view == NULL)
 
771
                return;
 
772
 
 
773
        /* Focus the view if needed: we need to focus the view otherwise 
 
774
           activating the binding for interactive search has no effect */
 
775
        gtk_widget_grab_focus (GTK_WIDGET (active_view));
 
776
        
 
777
        /* interactive search is builtin in GeditView, just activate
 
778
         * the corrisponding binding.
 
779
         */
 
780
        gtk_bindings_activate (GTK_OBJECT (active_view),
 
781
                               GDK_k,
 
782
                               GDK_CONTROL_MASK);
 
783
}