~ubuntu-branches/ubuntu/oneiric/notecase/oneiric

« back to all changes in this revision

Viewing changes to src/FindReplaceDlg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Van Wambeke
  • Date: 2008-05-29 20:20:17 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080529202017-kp2a07u83prpz0id
Tags: 1.9.1-0ubuntu1
New Upstream Release (LP: #230041)

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        UpdateTextFromScreen();
66
66
 
67
67
        //default search string: selected text OR previous search string
68
 
        gchar *selText =  g_text.GetSelectedText();
69
 
        if(NULL != selText)
70
 
        {
71
 
                if(strlen(selText) > 0)
72
 
                        g_objSearchInfo.m_strFindText = selText;
73
 
                g_free(selText);
74
 
        }
 
68
        std::string selText =  g_text.GetSelectedText();
 
69
        if(!selText.empty())
 
70
                g_objSearchInfo.m_strFindText = selText;
75
71
        GtkWidget *entry1 = lookup_widget(m_pDialog, "entry1");
76
72
        gtk_entry_set_text(GTK_ENTRY(entry1), g_objSearchInfo.m_strFindText.c_str());
77
73
        gtk_editable_select_region (GTK_EDITABLE (entry1), 0, g_objSearchInfo.m_strFindText.size());