GTK4: gtk_entry_get_text, gtk_entry_set_text
authorColin Clark <colin.clark@cclark.uk>
Wed, 27 Sep 2023 10:32:26 +0000 (11:32 +0100)
committerColin Clark <colin.clark@cclark.uk>
Wed, 27 Sep 2023 10:32:26 +0000 (11:32 +0100)
GTK4 migration

- gtk_entry_get_text, gtk_entry_set_text deleted - Use
gtk_entry_buffer_get_text, gtk_entry_buffer_set_text

24 files changed:
src/bar-exif.cc
src/bar-keywords.cc
src/bar-sort.cc
src/cache-maint.cc
src/collect-dlg.cc
src/desktop-file.cc
src/layout-util.cc
src/layout.cc
src/logwindow.cc
src/misc.cc
src/misc.h
src/pan-view/pan-view-filter.cc
src/pan-view/pan-view-search.cc
src/preferences.cc
src/search.cc
src/ui-bookmark.cc
src/ui-misc.cc
src/ui-pathsel.cc
src/ui-tabcomp.cc
src/ui-tree-edit.cc
src/ui-utildlg.cc
src/utilops.cc
src/view-file/view-file.cc
src/window.cc

index d22791a..71958c5 100644 (file)
 #include "main.h"
 #include "bar-exif.h"
 
+#include "bar.h"
+#include "dnd.h"
 #include "exif.h"
-#include "metadata.h"
 #include "filedata.h"
-#include "ui-misc.h"
-#include "ui-menu.h"
-#include "bar.h"
+#include "layout.h"
+#include "metadata.h"
+#include "misc.h"
 #include "rcfile.h"
-#include "dnd.h"
+#include "ui-menu.h"
+#include "ui-misc.h"
 #include "ui-utildlg.h"
-#include "layout.h"
 
 #define MIN_HEIGHT 25
 /*
@@ -245,7 +246,7 @@ static void bar_pane_exif_update_entry(PaneExifData *ped, GtkWidget *entry, gboo
                if (ee->editable)
                        {
                        g_signal_handlers_block_by_func(ee->value_widget, (gpointer *)bar_pane_exif_entry_changed, ee);
-                       gtk_entry_set_text(GTK_ENTRY(ee->value_widget), text ? text : "");
+                       gq_gtk_entry_set_text(GTK_ENTRY(ee->value_widget), text ? text : "");
                        g_signal_handlers_unblock_by_func(ee->value_widget, (gpointer)bar_pane_exif_entry_changed, ee);
                        gtk_widget_set_tooltip_text(ee->box, nullptr);
                        }
@@ -487,8 +488,8 @@ static void bar_pane_exif_edit_ok_cb(GenericDialog *, gpointer data)
        if (ped)
                {
                bar_pane_exif_add_entry(ped,
-                                       gtk_entry_get_text(GTK_ENTRY(cdd->key_entry)),
-                                       gtk_entry_get_text(GTK_ENTRY(cdd->title_entry)),
+                                       gq_gtk_entry_get_text(GTK_ENTRY(cdd->key_entry)),
+                                       gq_gtk_entry_get_text(GTK_ENTRY(cdd->title_entry)),
                                        cdd->if_set, cdd->editable);
                }
 
@@ -507,8 +508,8 @@ static void bar_pane_exif_edit_ok_cb(GenericDialog *, gpointer data)
                if (!pane) return;
 
                g_free(ee->key);
-               ee->key = g_strdup(gtk_entry_get_text(GTK_ENTRY(cdd->key_entry)));
-               title = gtk_entry_get_text(GTK_ENTRY(cdd->title_entry));
+               ee->key = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(cdd->key_entry)));
+               title = gq_gtk_entry_get_text(GTK_ENTRY(cdd->title_entry));
                if (!title || strlen(title) == 0)
                        {
                        g_free(ee->title);
@@ -570,7 +571,7 @@ static void bar_pane_exif_conf_dialog(GtkWidget *widget)
 
        cdd->key_entry = gtk_entry_new();
        gtk_widget_set_size_request(cdd->key_entry, 300, -1);
-       if (ee) gtk_entry_set_text(GTK_ENTRY(cdd->key_entry), ee->key);
+       if (ee) gq_gtk_entry_set_text(GTK_ENTRY(cdd->key_entry), ee->key);
        gtk_table_attach_defaults(GTK_TABLE(table), cdd->key_entry, 1, 2, 0, 1);
        generic_dialog_attach_default(gd, cdd->key_entry);
        gtk_widget_show(cdd->key_entry);
@@ -579,7 +580,7 @@ static void bar_pane_exif_conf_dialog(GtkWidget *widget)
 
        cdd->title_entry = gtk_entry_new();
        gtk_widget_set_size_request(cdd->title_entry, 300, -1);
-       if (ee) gtk_entry_set_text(GTK_ENTRY(cdd->title_entry), ee->title);
+       if (ee) gq_gtk_entry_set_text(GTK_ENTRY(cdd->title_entry), ee->title);
        gtk_table_attach_defaults(GTK_TABLE(table), cdd->title_entry, 1, 2, 1, 2);
        generic_dialog_attach_default(gd, cdd->title_entry);
        gtk_widget_show(cdd->title_entry);
index ab82200..60c78e4 100644 (file)
 #include "main.h"
 #include "bar-keywords.h"
 
+#include "bar.h"
+#include "dnd.h"
 #include "filedata.h"
+#include "layout.h"
 #include "metadata.h"
+#include "misc.h"
+#include "rcfile.h"
+#include "secure-save.h"
 #include "ui-fileops.h"
+#include "ui-menu.h"
 #include "ui-misc.h"
 #include "ui-utildlg.h"
-#include "bar.h"
-#include "ui-menu.h"
-#include "rcfile.h"
-#include "layout.h"
-#include "dnd.h"
-#include "secure-save.h"
 
 static void bar_pane_keywords_changed(GtkTextBuffer *buffer, gpointer data);
 
@@ -963,7 +964,7 @@ static void bar_pane_keywords_edit_dialog(PaneKeywordsData *pkd, gboolean edit_e
        pref_table_label(table, 0, 0, _("Keyword:"), GTK_ALIGN_END);
        cdd->edit_widget = gtk_entry_new();
        gtk_widget_set_size_request(cdd->edit_widget, 300, -1);
-       if (name) gtk_entry_set_text(GTK_ENTRY(cdd->edit_widget), name);
+       if (name) gq_gtk_entry_set_text(GTK_ENTRY(cdd->edit_widget), name);
        gtk_table_attach_defaults(GTK_TABLE(table), cdd->edit_widget, 1, 2, 0, 1);
        /* here could eventually be a text view instead of entry */
        generic_dialog_attach_default(gd, cdd->edit_widget);
@@ -1739,7 +1740,7 @@ static gboolean autocomplete_activate_cb(GtkWidget *, gpointer data)
        gboolean found = FALSE;
        gchar *string;
 
-       entry_text = g_strdup(gtk_entry_get_text(GTK_ENTRY(pkd->autocomplete)));
+       entry_text = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(pkd->autocomplete)));
        buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(pkd->keyword_view));
 
        kw_split = strtok(entry_text, ",");
@@ -1755,9 +1756,9 @@ static gboolean autocomplete_activate_cb(GtkWidget *, gpointer data)
                }
 
        g_free(entry_text);
-       entry_text = g_strdup(gtk_entry_get_text(GTK_ENTRY(pkd->autocomplete)));
+       entry_text = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(pkd->autocomplete)));
 
-       gtk_entry_set_text(GTK_ENTRY(pkd->autocomplete), "");
+       gq_gtk_entry_set_text(GTK_ENTRY(pkd->autocomplete), "");
 
        valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(keyword_store), &iter_t);
        while (valid)
index 3559846..22a4149 100644 (file)
 
 #include "collect.h"
 #include "collect-io.h"
+#include "editors.h"
 #include "filedata.h"
 #include "history-list.h"
 #include "layout.h"
 #include "layout-image.h"
-#include "utilops.h"
-#include "editors.h"
+#include "misc.h"
+#include "rcfile.h"
 #include "ui-bookmark.h"
 #include "ui-fileops.h"
 #include "ui-misc.h"
-#include "rcfile.h"
+#include "utilops.h"
 #include "window.h"
 
 
@@ -482,10 +483,10 @@ static void bar_sort_add_close(SortData *sd)
 static void bar_sort_add_ok_cb(FileDialog *fd, gpointer data)
 {
        auto sd = static_cast<SortData *>(data);
-       const gchar *name = gtk_entry_get_text(GTK_ENTRY(sd->dialog_name_entry));
+       const gchar *name = gq_gtk_entry_get_text(GTK_ENTRY(sd->dialog_name_entry));
        gboolean empty_name = (name[0] == '\0');
 
-       name = gtk_entry_get_text(GTK_ENTRY(sd->dialog_name_entry));
+       name = gq_gtk_entry_get_text(GTK_ENTRY(sd->dialog_name_entry));
        if (sd->mode == BAR_SORT_MODE_FOLDER)
                {
                if (empty_name)
index c2c9598..8440804 100644 (file)
@@ -25,6 +25,7 @@
 #include "cache-loader.h"
 #include "filedata.h"
 #include "layout.h"
+#include "misc.h"
 #include "pixbuf-util.h"
 #include "thumb.h"
 #include "thumb-standard.h"
@@ -178,7 +179,7 @@ static void cache_maintain_home_stop(CMData *cm)
 
        if (!cm->remote)
                {
-               gtk_entry_set_text(GTK_ENTRY(cm->entry), _("done"));
+               gq_gtk_entry_set_text(GTK_ENTRY(cm->entry), _("done"));
                gtk_spinner_stop(GTK_SPINNER(cm->spinner));
 
                gtk_widget_set_sensitive(cm->button_stop, FALSE);
@@ -309,7 +310,7 @@ static gboolean cache_maintain_home_cb(gpointer data)
                        {
                        buf = "...";
                        }
-               gtk_entry_set_text(GTK_ENTRY(cm->entry), buf);
+               gq_gtk_entry_set_text(GTK_ENTRY(cm->entry), buf);
                }
 
        return G_SOURCE_CONTINUE;
@@ -677,7 +678,7 @@ static void cache_manager_render_finish(CacheOpsData *cd)
        cache_manager_render_reset(cd);
        if (!cd->remote)
                {
-               gtk_entry_set_text(GTK_ENTRY(cd->progress), _("done"));
+               gq_gtk_entry_set_text(GTK_ENTRY(cd->progress), _("done"));
                gtk_spinner_stop(GTK_SPINNER(cd->spinner));
 
                gtk_widget_set_sensitive(cd->group, TRUE);
@@ -691,7 +692,7 @@ static void cache_manager_render_stop_cb(GenericDialog *, gpointer data)
 {
        auto cd = static_cast<CacheOpsData *>(data);
 
-       gtk_entry_set_text(GTK_ENTRY(cd->progress), _("stopped"));
+       gq_gtk_entry_set_text(GTK_ENTRY(cd->progress), _("stopped"));
        cache_manager_render_finish(cd);
 }
 
@@ -749,7 +750,7 @@ static gboolean cache_manager_render_file(CacheOpsData *cd)
                        {
                        if (!cd->remote)
                                {
-                               gtk_entry_set_text(GTK_ENTRY(cd->progress), fd->path);
+                               gq_gtk_entry_set_text(GTK_ENTRY(cd->progress), fd->path);
                                cd->count_done = cd->count_done + 1;
                                gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(cd->progress_bar), static_cast<gdouble>(cd->count_done) / cd->count_total);
                                }
@@ -780,7 +781,7 @@ static gboolean cache_manager_render_file(CacheOpsData *cd)
 
        if (!cd->remote)
                {
-               gtk_entry_set_text(GTK_ENTRY(cd->progress), _("done"));
+               gq_gtk_entry_set_text(GTK_ENTRY(cd->progress), _("done"));
                }
        cache_manager_render_finish(cd);
 
@@ -803,7 +804,7 @@ static void cache_manager_render_start_cb(GenericDialog *, gpointer data)
                if (cd->list || !gtk_widget_get_sensitive(cd->button_start)) return;
                }
 
-       path = remove_trailing_slash((gtk_entry_get_text(GTK_ENTRY(cd->entry))));
+       path = remove_trailing_slash((gq_gtk_entry_get_text(GTK_ENTRY(cd->entry))));
        parse_out_relatives(path);
 
        if (!isdir(path))
@@ -917,7 +918,7 @@ static void cache_manager_render_dialog(GtkWidget *widget, const gchar *path)
        cd->progress = gtk_entry_new();
        gtk_widget_set_can_focus(cd->progress, FALSE);
        gtk_editable_set_editable(GTK_EDITABLE(cd->progress), FALSE);
-       gtk_entry_set_text(GTK_ENTRY(cd->progress), _("click start to begin"));
+       gq_gtk_entry_set_text(GTK_ENTRY(cd->progress), _("click start to begin"));
        gq_gtk_box_pack_start(GTK_BOX(hbox), cd->progress, TRUE, TRUE, 0);
        gtk_widget_show(cd->progress);
 
@@ -1327,7 +1328,7 @@ static void cache_manager_sim_stop_cb(GenericDialog *, gpointer data)
 {
        auto cd = static_cast<CacheOpsData *>(data);
 
-       gtk_entry_set_text(GTK_ENTRY(cd->progress), _("stopped"));
+       gq_gtk_entry_set_text(GTK_ENTRY(cd->progress), _("stopped"));
        cache_manager_sim_finish(cd);
 }
 
@@ -1421,7 +1422,7 @@ static gboolean cache_manager_sim_file(CacheOpsData *cd)
 
                if (!cd->remote)
                        {
-                       gtk_entry_set_text(GTK_ENTRY(cd->progress), fd->path);
+                       gq_gtk_entry_set_text(GTK_ENTRY(cd->progress), fd->path);
                        }
 
                file_data_unref(fd);
@@ -1448,7 +1449,7 @@ static gboolean cache_manager_sim_file(CacheOpsData *cd)
 
                if (!cd->remote)
                        {
-                       gtk_entry_set_text(GTK_ENTRY(cd->progress), _("done"));
+                       gq_gtk_entry_set_text(GTK_ENTRY(cd->progress), _("done"));
                        }
 
        cache_manager_sim_finish(cd);
@@ -1472,7 +1473,7 @@ static void cache_manager_sim_start_cb(GenericDialog *, gpointer data)
                if (cd->list || !gtk_widget_get_sensitive(cd->button_start)) return;
                }
 
-       path = remove_trailing_slash((gtk_entry_get_text(GTK_ENTRY(cd->entry))));
+       path = remove_trailing_slash((gq_gtk_entry_get_text(GTK_ENTRY(cd->entry))));
        parse_out_relatives(path);
 
        if (!isdir(path))
@@ -1555,7 +1556,7 @@ static void cache_manager_sim_load_dialog(GtkWidget *widget, const gchar *path)
        cd->progress = gtk_entry_new();
        gtk_widget_set_can_focus(cd->progress, FALSE);
        gtk_editable_set_editable(GTK_EDITABLE(cd->progress), FALSE);
-       gtk_entry_set_text(GTK_ENTRY(cd->progress), _("click start to begin"));
+       gq_gtk_entry_set_text(GTK_ENTRY(cd->progress), _("click start to begin"));
        gq_gtk_box_pack_start(GTK_BOX(hbox), cd->progress, TRUE, TRUE, 0);
        gtk_widget_show(cd->progress);
 
@@ -1602,7 +1603,7 @@ static void cache_manager_cache_maintenance_start_cb(GenericDialog *, gpointer d
                if (cd->list || !gtk_widget_get_sensitive(cd->button_start)) return;
                }
 
-       path = remove_trailing_slash((gtk_entry_get_text(GTK_ENTRY(cd->entry))));
+       path = remove_trailing_slash((gq_gtk_entry_get_text(GTK_ENTRY(cd->entry))));
        parse_out_relatives(path);
 
        if (!isdir(path))
index cd4c4c3..dca4aa5 100644 (file)
@@ -26,8 +26,9 @@
 #include "collect-dlg.h"
 
 #include "collect-io.h"
-#include "utilops.h"
+#include "misc.h"
 #include "ui-fileops.h"
+#include "utilops.h"
 
 enum {
        DIALOG_SAVE,
@@ -83,7 +84,7 @@ static void collection_save_cb(GenericDialog *gd, gpointer data)
 {
        auto cd = static_cast<CollectionData *>(data);
 
-       cd->collection_path = g_strconcat(get_collections_dir(), G_DIR_SEPARATOR_S, gtk_entry_get_text(GTK_ENTRY(cd->dialog_name_entry)), GQ_COLLECTION_EXT, nullptr);
+       cd->collection_path = g_strconcat(get_collections_dir(), G_DIR_SEPARATOR_S, gq_gtk_entry_get_text(GTK_ENTRY(cd->dialog_name_entry)), GQ_COLLECTION_EXT, nullptr);
 
        collection_save_confirmed(gd, FALSE, cd);
 }
@@ -184,7 +185,7 @@ static void collection_save_or_append_dialog(gint type, CollectionData *cd)
 
                gq_gtk_box_pack_start(GTK_BOX(gdlg->vbox), cd->dialog_name_entry, FALSE, FALSE, 0);
 
-               gtk_entry_set_text(GTK_ENTRY(cd->dialog_name_entry), cd->name);
+               gq_gtk_entry_set_text(GTK_ENTRY(cd->dialog_name_entry), cd->name);
                gtk_widget_grab_focus(cd->dialog_name_entry);
                gtk_widget_show(GENERIC_DIALOG(gdlg)->dialog);
                }
index 710ea2a..bd97241 100644 (file)
 #include "desktop-file.h"
 
 #include "editors.h"
-#include "ui-misc.h"
-#include "ui-fileops.h"
+#include "layout-util.h"
+#include "misc.h"
 #include "pixbuf-util.h"
-#include "window.h"
+#include "ui-fileops.h"
+#include "ui-misc.h"
 #include "utilops.h"
-#include "layout-util.h"
+#include "window.h"
 
 #define CONFIG_WINDOW_DEF_WIDTH                700
 #define CONFIG_WINDOW_DEF_HEIGHT       400
@@ -70,7 +71,7 @@ static gboolean editor_window_save(EditorWindow *ew)
        GtkTextIter start, end;
        GError *error = nullptr;
        gboolean ret = TRUE;
-       const gchar *name = gtk_entry_get_text(GTK_ENTRY(ew->entry));
+       const gchar *name = gq_gtk_entry_get_text(GTK_ENTRY(ew->entry));
 
        if (!name || !name[0])
                {
@@ -149,7 +150,7 @@ static void editor_window_text_modified_cb(GtkWidget *, gpointer data)
 static void editor_window_entry_changed_cb(GtkWidget *, gpointer data)
 {
        auto ew = static_cast<EditorWindow *>(data);
-       const gchar *content = gtk_entry_get_text(GTK_ENTRY(ew->entry));
+       const gchar *content = gq_gtk_entry_get_text(GTK_ENTRY(ew->entry));
        gboolean modified = ew->modified;
 
        if (!modified)
@@ -206,7 +207,7 @@ static void editor_window_new(const gchar *src_path, const gchar *desktop_name)
        ew->desktop_name = nullptr;
        if (desktop_name)
                {
-               gtk_entry_set_text(GTK_ENTRY(ew->entry), desktop_name);
+               gq_gtk_entry_set_text(GTK_ENTRY(ew->entry), desktop_name);
                ew->desktop_name = g_strdup(desktop_name);
                }
        gtk_widget_show(ew->entry);
index 701e59a..c109d33 100644 (file)
@@ -109,7 +109,7 @@ gboolean layout_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer dat
                {
                if (event->keyval == GDK_KEY_Escape && lw->dir_fd)
                        {
-                       gtk_entry_set_text(GTK_ENTRY(lw->path_entry), lw->dir_fd->path);
+                       gq_gtk_entry_set_text(GTK_ENTRY(lw->path_entry), lw->dir_fd->path);
                        }
 
                /* the gtkaccelgroup of the window is stealing presses before they get to the entry (and more),
@@ -2208,7 +2208,7 @@ static void window_rename_ok(GenericDialog *, gpointer data)
        gchar *xml_name;
        gchar *new_id;
 
-       new_id = g_strdup(gtk_entry_get_text(GTK_ENTRY(rw->window_name_entry)));
+       new_id = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(rw->window_name_entry)));
 
        list = layout_window_menu_list(list);
        while (list)
@@ -2480,7 +2480,7 @@ static void layout_menu_window_rename_cb(GtkWidget *, gpointer data)
        rw->window_name_entry = gtk_entry_new();
        gtk_widget_set_can_focus(rw->window_name_entry, TRUE);
        gtk_editable_set_editable(GTK_EDITABLE(rw->window_name_entry), TRUE);
-       gtk_entry_set_text(GTK_ENTRY(rw->window_name_entry), lw->options.id);
+       gq_gtk_entry_set_text(GTK_ENTRY(rw->window_name_entry), lw->options.id);
        gq_gtk_box_pack_start(GTK_BOX(hbox), rw->window_name_entry, TRUE, TRUE, 0);
        gtk_widget_grab_focus(GTK_WIDGET(rw->window_name_entry));
        gtk_widget_show(rw->window_name_entry);
index 0065de5..c2ec03b 100644 (file)
@@ -22,6 +22,8 @@
 #include "main.h"
 #include "layout.h"
 
+#include "bar.h"
+#include "bar-sort.h"
 #include "filedata.h"
 #include "histogram.h"
 #include "history-list.h"
 #include "layout-util.h"
 #include "logwindow.h"
 #include "menu.h"
+#include "metadata.h"
+#include "misc.h"
 #include "pixbuf-util.h"
-#include "utilops.h"
-#include "view-dir.h"
-#include "view-file.h"
+#include "preferences.h"
+#include "rcfile.h"
+#include "shortcuts.h"
 #include "ui-fileops.h"
 #include "ui-menu.h"
 #include "ui-misc.h"
 #include "ui-tabcomp.h"
+#include "utilops.h"
+#include "view-dir.h"
+#include "view-file.h"
 #include "window.h"
-#include "metadata.h"
-#include "rcfile.h"
-#include "bar.h"
-#include "bar-sort.h"
-#include "preferences.h"
-#include "shortcuts.h"
+
 #ifdef GDK_WINDOWING_X11
 #include <gdk/gdkx.h>
 #endif
@@ -222,7 +224,7 @@ static void layout_path_entry_changed_cb(GtkWidget *widget, gpointer data)
 
        if (gtk_combo_box_get_active(GTK_COMBO_BOX(widget)) < 0) return;
 
-       buf = g_strdup(gtk_entry_get_text(GTK_ENTRY(lw->path_entry)));
+       buf = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(lw->path_entry)));
        if (!lw->dir_fd || strcmp(buf, lw->dir_fd->path) != 0)
                {
                layout_set_path(lw, buf);
@@ -248,7 +250,7 @@ static void layout_path_entry_tab_cb(const gchar *path, gpointer data)
                        /* put the G_DIR_SEPARATOR back, if we are in tab completion for a dir and result was path change */
                        gtk_editable_insert_text(GTK_EDITABLE(lw->path_entry), G_DIR_SEPARATOR_S, -1, &pos);
                        gtk_editable_set_position(GTK_EDITABLE(lw->path_entry),
-                                                 strlen(gtk_entry_get_text(GTK_ENTRY(lw->path_entry))));
+                                                 strlen(gq_gtk_entry_get_text(GTK_ENTRY(lw->path_entry))));
                        }
                }
        else if (lw->dir_fd)
@@ -1128,7 +1130,7 @@ static void layout_sync_path(LayoutWindow *lw)
 {
        if (!lw->dir_fd) return;
 
-       if (lw->path_entry) gtk_entry_set_text(GTK_ENTRY(lw->path_entry), lw->dir_fd->path);
+       if (lw->path_entry) gq_gtk_entry_set_text(GTK_ENTRY(lw->path_entry), lw->dir_fd->path);
 
        if (lw->vd) vd_set_fd(lw->vd, lw->dir_fd);
        if (lw->vf) vf_set_fd(lw->vf, lw->dir_fd);
@@ -2259,7 +2261,7 @@ static void layout_config_ok_cb(GtkWidget *widget, gpointer data)
 static void home_path_set_current_cb(GtkWidget *, gpointer data)
 {
        auto lc = static_cast<LayoutConfig *>(data);
-       gtk_entry_set_text(GTK_ENTRY(lc->home_path_entry), layout_get_path(lc->lw));
+       gq_gtk_entry_set_text(GTK_ENTRY(lc->home_path_entry), layout_get_path(lc->lw));
 }
 
 static void startup_path_set_current_cb(GtkWidget *widget, gpointer data)
index 502fb07..86ac4a1 100644 (file)
@@ -177,7 +177,7 @@ static void log_window_regexp_cb(GtkWidget *text_entry, gpointer)
 {
        gchar *new_regexp;
 
-       new_regexp = g_strdup(gtk_entry_get_text(GTK_ENTRY(text_entry)));
+       new_regexp = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(text_entry)));
        set_regexp(new_regexp);
        g_free(new_regexp);
 }
@@ -193,7 +193,7 @@ static void remove_green_bg(LogWindow *logwin)
        gchar *tag_name;
        gint offset;
 
-       text = gtk_entry_get_text(GTK_ENTRY(logwin->search_entry_box));
+       text = gq_gtk_entry_get_text(GTK_ENTRY(logwin->search_entry_box));
        buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(logwin->text));
        gtk_text_buffer_get_start_iter(buffer, &start_find);
 
@@ -228,7 +228,7 @@ static void search_activate_event(GtkEntry *, LogWindow *logwin)
        gint offset;
 
        buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(logwin->text));
-       text = gtk_entry_get_text(GTK_ENTRY(logwin->search_entry_box));
+       text = gq_gtk_entry_get_text(GTK_ENTRY(logwin->search_entry_box));
 
        if (logwin->highlight_all)
                {
@@ -271,14 +271,14 @@ static gboolean search_keypress_event(GtkWidget *, GdkEventKey *, LogWindow *log
        buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(logwin->text));
        gtk_text_buffer_get_start_iter(buffer, &start_find);
 
-       text = gtk_entry_get_text(GTK_ENTRY(logwin->search_entry_box));
+       text = gq_gtk_entry_get_text(GTK_ENTRY(logwin->search_entry_box));
        if (strlen(text) == 0)
                {
                selected = gtk_text_buffer_get_selection_bounds(buffer, &start_sel, &end_sel);
                if (selected)
                        {
                        text = gtk_text_buffer_get_text(buffer, &start_sel, &end_sel, FALSE);
-                       gtk_entry_set_text(GTK_ENTRY(logwin->search_entry_box), text);
+                       gq_gtk_entry_set_text(GTK_ENTRY(logwin->search_entry_box), text);
                        }
                }
 
@@ -363,7 +363,7 @@ static void search_entry_icon_cb(GtkEntry *, GtkEntryIconPosition pos, GdkEvent
 
        if (pos == GTK_ENTRY_ICON_SECONDARY)
                {
-               gtk_entry_set_text(GTK_ENTRY(logwin->search_entry_box), "");
+               gq_gtk_entry_set_text(GTK_ENTRY(logwin->search_entry_box), "");
 
                buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(logwin->text));
                gtk_text_buffer_get_start_iter(buffer, &start_find);
@@ -376,7 +376,7 @@ static void search_entry_icon_cb(GtkEntry *, GtkEntryIconPosition pos, GdkEvent
 static void filter_entry_icon_cb(GtkEntry *entry, GtkEntryIconPosition, GdkEvent *, gpointer)
 {
        const gchar *blank = "";
-       gtk_entry_set_text(entry, blank);
+       gq_gtk_entry_set_text(entry, blank);
        set_regexp(blank);
 }
 
@@ -588,7 +588,7 @@ static void log_window_show(LogWindow *logwin)
        regexp = g_strdup(get_regexp());
        if (regexp != nullptr)
                {
-               gtk_entry_set_text(GTK_ENTRY(logwin->regexp_box), regexp);
+               gq_gtk_entry_set_text(GTK_ENTRY(logwin->regexp_box), regexp);
                g_free(regexp);
                }
 }
index 838ea4e..167d253 100644 (file)
@@ -395,6 +395,22 @@ void convert_gdkcolor_to_gdkrgba(gpointer data, GdkRGBA *gdk_rgba)
 }
 #endif
 
+void gq_gtk_entry_set_text(GtkEntry *entry, const gchar *text)
+{
+       GtkEntryBuffer *buffer;
+
+       buffer = gtk_entry_get_buffer(entry);
+       gtk_entry_buffer_set_text(buffer, text, static_cast<gint>(g_utf8_strlen(text, -1)));
+}
+
+const gchar *gq_gtk_entry_get_text(GtkEntry *entry)
+{
+       GtkEntryBuffer *buffer;
+
+       buffer = gtk_entry_get_buffer(entry);
+       return gtk_entry_buffer_get_text(buffer);
+}
+
 /* Copied from the libarchive .repo. examples */
 
 #ifndef HAVE_ARCHIVE
index 1a21d02..8b6c1b6 100644 (file)
 
 struct FileData;
 
-gdouble get_zoom_increment();
-gchar *utf8_validate_or_convert(const gchar *text);
-gint utf8_compare(const gchar *s1, const gchar *s2, gboolean case_sensitive);
-gchar *expand_tilde(const gchar *filename);
-int runcmd(const gchar *cmd);
-gchar *decode_geo_parameters(const gchar *input_text);
-gint date_get_first_day_of_week();
-gchar *date_get_abbreviated_day_name(gint day);
+const gchar *gq_gtk_entry_get_text(GtkEntry *entry);
 gchar *convert_rating_to_stars(gint rating);
+gchar *date_get_abbreviated_day_name(gint day);
+gchar *decode_geo_parameters(const gchar *input_text);
+gchar *expand_tilde(const gchar *filename);
 gchar *get_symbolic_link(const gchar *path_utf8);
+gchar *utf8_validate_or_convert(const gchar *text);
+gdouble get_zoom_increment();
+gint date_get_first_day_of_week();
 gint get_cpu_cores();
+gint utf8_compare(const gchar *s1, const gchar *s2, gboolean case_sensitive);
+int runcmd(const gchar *cmd);
+void gq_gtk_entry_set_text(GtkEntry *entry, const gchar *text);
 
 #ifdef HAVE_GTK4
 void convert_gdkcolor_to_gdkrgba(gpointer gdk_color, GdkRGBA *gdk_rgba);
index b25a142..d715a89 100644 (file)
 
 #include "image.h"
 #include "metadata.h"
+#include "misc.h"
 #include "pan-view.h"
 #include "ui-fileops.h"
-#include "ui-tabcomp.h"
 #include "ui-misc.h"
+#include "ui-tabcomp.h"
 
 PanViewFilterUi *pan_filter_ui_new(PanWindow *pw)
 {
@@ -161,7 +162,7 @@ void pan_filter_activate_cb(const gchar *text, gpointer data)
 
        // Get all relevant state and reset UI.
        gtk_combo_box_get_active_iter(GTK_COMBO_BOX(ui->filter_mode_combo), &iter);
-       gtk_entry_set_text(GTK_ENTRY(ui->filter_entry), "");
+       gq_gtk_entry_set_text(GTK_ENTRY(ui->filter_entry), "");
        tab_completion_append_to_history(ui->filter_entry, text);
 
        // Add new filter element.
@@ -204,7 +205,7 @@ void pan_filter_activate_unused(PanWindow *pw)
 {
        gchar *text;
 
-       text = g_strdup(gtk_entry_get_text(GTK_ENTRY(pw->filter_ui->filter_entry)));
+       text = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(pw->filter_ui->filter_entry)));
        pan_filter_activate_cb(text, pw);
        g_free(text);
 }
index d064ed7..aaf7a5f 100644 (file)
 #include "pan-view-search.h"
 
 #include "image.h"
+#include "misc.h"
 #include "pan-calendar.h"
 #include "pan-util.h"
 #include "pan-view.h"
-#include "ui-tabcomp.h"
 #include "ui-misc.h"
+#include "ui-tabcomp.h"
 
 PanViewSearchUi *pan_search_ui_new(PanWindow *pw)
 {
@@ -410,7 +411,7 @@ void pan_search_activate(PanWindow *pw)
 {
        gchar *text;
 
-       text = g_strdup(gtk_entry_get_text(GTK_ENTRY(pw->search_ui->search_entry)));
+       text = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(pw->search_ui->search_entry)));
        pan_search_activate_cb(text, pw);
        g_free(text);
 }
index 956b083..fe400b0 100644 (file)
@@ -223,7 +223,7 @@ void config_entry_to_option(GtkWidget *entry, gchar **option, gchar *(*func)(con
 
        g_free(*option);
        *option = nullptr;
-       buf = gtk_entry_get_text(GTK_ENTRY(entry));
+       buf = gq_gtk_entry_get_text(GTK_ENTRY(entry));
        if (buf && strlen(buf) > 0)
                {
                if (func)
@@ -1372,7 +1372,7 @@ static void filter_disable_cb(GtkWidget *widget, gpointer data)
 
 static void safe_delete_view_cb(GtkWidget *, gpointer)
 {
-       layout_set_path(nullptr, gtk_entry_get_text(GTK_ENTRY(safe_delete_path_entry)));
+       layout_set_path(nullptr, gq_gtk_entry_get_text(GTK_ENTRY(safe_delete_path_entry)));
 }
 
 static void safe_delete_clear_ok_cb(GenericDialog *, gpointer)
@@ -1393,7 +1393,7 @@ static void safe_delete_clear_cb(GtkWidget *widget, gpointer)
        entry = gtk_entry_new();
        gtk_widget_set_can_focus(entry, FALSE);
        gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE);
-       if (options->file_ops.safe_delete_path) gtk_entry_set_text(GTK_ENTRY(entry), options->file_ops.safe_delete_path);
+       if (options->file_ops.safe_delete_path) gq_gtk_entry_set_text(GTK_ENTRY(entry), options->file_ops.safe_delete_path);
        gq_gtk_box_pack_start(GTK_BOX(gd->vbox), entry, FALSE, FALSE, 0);
        gtk_widget_show(entry);
        gtk_widget_show(gd->dialog);
@@ -1831,11 +1831,11 @@ static void help_search_engine_entry_icon_cb(GtkEntry *, GtkEntryIconPosition po
 {
        if (pos == GTK_ENTRY_ICON_PRIMARY)
                {
-               gtk_entry_set_text(GTK_ENTRY(userdata), HELP_SEARCH_ENGINE);
+               gq_gtk_entry_set_text(GTK_ENTRY(userdata), HELP_SEARCH_ENGINE);
                }
        else
                {
-               gtk_entry_set_text(GTK_ENTRY(userdata), "");
+               gq_gtk_entry_set_text(GTK_ENTRY(userdata), "");
                }
 }
 
@@ -1846,12 +1846,12 @@ static void star_rating_star_icon_cb(GtkEntry *, GtkEntryIconPosition pos, GdkEv
        if (pos == GTK_ENTRY_ICON_PRIMARY)
                {
                rating_symbol = g_strdup_printf("U+%X", STAR_RATING_STAR);
-               gtk_entry_set_text(GTK_ENTRY(userdata), rating_symbol);
+               gq_gtk_entry_set_text(GTK_ENTRY(userdata), rating_symbol);
                g_free(rating_symbol);
                }
        else
                {
-               gtk_entry_set_text(GTK_ENTRY(userdata), "U+");
+               gq_gtk_entry_set_text(GTK_ENTRY(userdata), "U+");
                gtk_widget_grab_focus(GTK_WIDGET(userdata));
                gtk_editable_select_region(GTK_EDITABLE(userdata), 2, 2);
                }
@@ -1864,12 +1864,12 @@ static void star_rating_rejected_icon_cb(GtkEntry *, GtkEntryIconPosition pos, G
        if (pos == GTK_ENTRY_ICON_PRIMARY)
                {
                rating_symbol = g_strdup_printf("U+%X", STAR_RATING_REJECTED);
-               gtk_entry_set_text(GTK_ENTRY(userdata), rating_symbol);
+               gq_gtk_entry_set_text(GTK_ENTRY(userdata), rating_symbol);
                g_free(rating_symbol);
                }
        else
                {
-               gtk_entry_set_text(GTK_ENTRY(userdata), "U+");
+               gq_gtk_entry_set_text(GTK_ENTRY(userdata), "U+");
                gtk_widget_grab_focus(GTK_WIDGET(userdata));
                gtk_editable_select_region(GTK_EDITABLE(userdata), 2, 2);
                }
@@ -1888,7 +1888,7 @@ static guint star_rating_symbol_test(GtkWidget *, gpointer data)
        list = gtk_container_get_children(hbox);
 
        hex_code_entry = static_cast<GtkEntry *>(g_list_nth_data(list, 2));
-       hex_code_full = g_strdup(gtk_entry_get_text(hex_code_entry));
+       hex_code_full = g_strdup(gq_gtk_entry_get_text(hex_code_entry));
 
        hex_code = g_strsplit(hex_code_full, "+", 2);
        if (hex_code[0] && hex_code[1])
@@ -2033,7 +2033,7 @@ static void config_tab_general(GtkWidget *notebook)
        pref_label_new(hbox, g_strdup(str->str));
        rating_symbol = g_strdup_printf("U+%X", options->star_rating.star);
        star_rating_entry = gtk_entry_new();
-       gtk_entry_set_text(GTK_ENTRY(star_rating_entry), rating_symbol);
+       gq_gtk_entry_set_text(GTK_ENTRY(star_rating_entry), rating_symbol);
        gq_gtk_box_pack_start(GTK_BOX(hbox), star_rating_entry, FALSE, FALSE, 0);
        gtk_entry_set_width_chars(GTK_ENTRY(star_rating_entry), 15);
        gtk_widget_show(star_rating_entry);
@@ -2065,7 +2065,7 @@ static void config_tab_general(GtkWidget *notebook)
        pref_label_new(hbox, g_strdup(str->str));
        rating_symbol = g_strdup_printf("U+%X", options->star_rating.rejected);
        star_rating_entry = gtk_entry_new();
-       gtk_entry_set_text(GTK_ENTRY(star_rating_entry), rating_symbol);
+       gq_gtk_entry_set_text(GTK_ENTRY(star_rating_entry), rating_symbol);
        gq_gtk_box_pack_start(GTK_BOX(hbox), star_rating_entry, FALSE, FALSE, 0);
        gtk_entry_set_width_chars(GTK_ENTRY(star_rating_entry), 15);
        gtk_widget_show(star_rating_entry);
@@ -2222,7 +2222,7 @@ static void config_tab_general(GtkWidget *notebook)
        group = pref_group_new(vbox, FALSE, _("On-line help search engine"), GTK_ORIENTATION_VERTICAL);
 
        help_search_engine_entry = gtk_entry_new();
-       gtk_entry_set_text(GTK_ENTRY(help_search_engine_entry), options->help_search_engine);
+       gq_gtk_entry_set_text(GTK_ENTRY(help_search_engine_entry), options->help_search_engine);
        gq_gtk_box_pack_start(GTK_BOX(group), help_search_engine_entry, FALSE, FALSE, 0);
        gtk_widget_show(help_search_engine_entry);
 
@@ -2684,7 +2684,7 @@ static void config_tab_files(GtkWidget *notebook)
        group = pref_group_new(vbox, FALSE, _("Grouping sidecar extensions"), GTK_ORIENTATION_VERTICAL);
 
        sidecar_ext_entry = gtk_entry_new();
-       gtk_entry_set_text(GTK_ENTRY(sidecar_ext_entry), options->sidecar.ext);
+       gq_gtk_entry_set_text(GTK_ENTRY(sidecar_ext_entry), options->sidecar.ext);
        gq_gtk_box_pack_start(GTK_BOX(group), sidecar_ext_entry, FALSE, FALSE, 0);
        gtk_widget_show(sidecar_ext_entry);
 
@@ -3029,7 +3029,7 @@ static void keywords_find_finish(KeywordFindData *kfd)
 {
        keywords_find_reset(kfd);
 
-       gtk_entry_set_text(GTK_ENTRY(kfd->progress), _("done"));
+       gq_gtk_entry_set_text(GTK_ENTRY(kfd->progress), _("done"));
        gtk_spinner_stop(GTK_SPINNER(kfd->spinner));
 
        gtk_widget_set_sensitive(kfd->group, TRUE);
@@ -3074,7 +3074,7 @@ static gboolean keywords_find_file(gpointer data)
                        keywords = keywords->next;
                        }
 
-               gtk_entry_set_text(GTK_ENTRY(kfd->progress), fd->path);
+               gq_gtk_entry_set_text(GTK_ENTRY(kfd->progress), fd->path);
                file_data_unref(fd);
                g_list_free_full(keywords, g_free);
 
@@ -3106,7 +3106,7 @@ static void keywords_find_start_cb(GenericDialog *, gpointer data)
 
        if (kfd->list || !gtk_widget_get_sensitive(kfd->button_start)) return;
 
-       path = remove_trailing_slash((gtk_entry_get_text(GTK_ENTRY(kfd->entry))));
+       path = remove_trailing_slash((gq_gtk_entry_get_text(GTK_ENTRY(kfd->entry))));
        parse_out_relatives(path);
 
        if (!isdir(path))
@@ -3178,7 +3178,7 @@ static void keywords_find_dialog(GtkWidget *widget, const gchar *path)
        kfd->progress = gtk_entry_new();
        gtk_widget_set_can_focus(kfd->progress, FALSE);
        gtk_editable_set_editable(GTK_EDITABLE(kfd->progress), FALSE);
-       gtk_entry_set_text(GTK_ENTRY(kfd->progress), _("click start to begin"));
+       gq_gtk_entry_set_text(GTK_ENTRY(kfd->progress), _("click start to begin"));
        gq_gtk_box_pack_start(GTK_BOX(hbox), kfd->progress, TRUE, TRUE, 0);
        gtk_widget_show(kfd->progress);
 
@@ -3410,7 +3410,7 @@ static void config_tab_color(GtkWidget *notebook)
                gtk_entry_set_max_length(GTK_ENTRY(entry), EDITOR_NAME_MAX_LENGTH);
                if (options->color_profile.input_name[i])
                        {
-                       gtk_entry_set_text(GTK_ENTRY(entry), options->color_profile.input_name[i]);
+                       gq_gtk_entry_set_text(GTK_ENTRY(entry), options->color_profile.input_name[i]);
                        }
                gtk_table_attach(GTK_TABLE(table), entry, 1, 2, i + 1, i + 2,
                                 static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND), static_cast<GtkAttachOptions>(0), 0, 0);
index 5c55b9d..20d5b35 100644 (file)
@@ -1562,19 +1562,19 @@ static void search_gps_dnd_received_cb(GtkWidget *, GdkDragContext *,
                        longitude = metadata_read_GPS_coord(fd, "Xmp.exif.GPSLongitude", 1000);
                        if (latitude != 1000 && longitude != 1000)
                                {
-                               gtk_entry_set_text(GTK_ENTRY(sd->entry_gps_coord),
+                               gq_gtk_entry_set_text(GTK_ENTRY(sd->entry_gps_coord),
                                                        g_strdup_printf("%lf %lf", latitude, longitude));
                                }
                        else
                                {
-                               gtk_entry_set_text(GTK_ENTRY(sd->entry_gps_coord), "Image is not geocoded");
+                               gq_gtk_entry_set_text(GTK_ENTRY(sd->entry_gps_coord), "Image is not geocoded");
                                }
                        }
                }
 
        if (info == TARGET_TEXT_PLAIN)
                {
-               gtk_entry_set_text(GTK_ENTRY(sd->entry_gps_coord),"");
+               gq_gtk_entry_set_text(GTK_ENTRY(sd->entry_gps_coord),"");
                }
 }
 
@@ -1595,7 +1595,7 @@ static void search_path_entry_dnd_received_cb(GtkWidget *, GdkDragContext *,
                if (list != nullptr)
                        {
                        fd = static_cast<FileData *>(list->data);
-                       gtk_entry_set_text(GTK_ENTRY(sd->path_entry),
+                       gq_gtk_entry_set_text(GTK_ENTRY(sd->path_entry),
                                                g_strdup_printf("%s", fd->path));
                        gtk_widget_set_tooltip_text(GTK_WIDGET(sd->path_entry),g_strdup_printf("%s", fd->path));
                        }
@@ -1603,7 +1603,7 @@ static void search_path_entry_dnd_received_cb(GtkWidget *, GdkDragContext *,
 
        if (info == TARGET_TEXT_PLAIN)
                {
-               gtk_entry_set_text(GTK_ENTRY(sd->path_entry),"");
+               gq_gtk_entry_set_text(GTK_ENTRY(sd->path_entry),"");
                }
 }
 
@@ -1624,7 +1624,7 @@ static void search_image_content_dnd_received_cb(GtkWidget *, GdkDragContext *,
                if (list != nullptr)
                        {
                        fd = static_cast<FileData *>(list->data);
-                       gtk_entry_set_text(GTK_ENTRY(sd->entry_similarity),
+                       gq_gtk_entry_set_text(GTK_ENTRY(sd->entry_similarity),
                                                g_strdup_printf("%s", fd->path));
                        gtk_widget_set_tooltip_text(GTK_WIDGET(sd->entry_similarity),g_strdup_printf("%s", fd->path));
                        }
@@ -1632,7 +1632,7 @@ static void search_image_content_dnd_received_cb(GtkWidget *, GdkDragContext *,
 
        if (info == TARGET_TEXT_PLAIN)
                {
-               gtk_entry_set_text(GTK_ENTRY(sd->entry_similarity),"");
+               gq_gtk_entry_set_text(GTK_ENTRY(sd->entry_similarity),"");
                }
 }
 
@@ -2666,14 +2666,14 @@ static void search_start_cb(GtkWidget *, gpointer data)
 
        if (sd->match_name_enable) history_combo_append_history(sd->entry_name, nullptr);
        g_free(sd->search_name);
-       sd->search_name = g_strdup(gtk_entry_get_text(GTK_ENTRY(sd->entry_name)));
+       sd->search_name = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(sd->entry_name)));
 
        /* XXX */
        g_free(sd->search_comment);
-       sd->search_comment = g_strdup(gtk_entry_get_text(GTK_ENTRY(sd->entry_comment)));
+       sd->search_comment = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(sd->entry_comment)));
 
        g_free(sd->search_similarity_path);
-       sd->search_similarity_path = g_strdup(gtk_entry_get_text(GTK_ENTRY(sd->entry_similarity)));
+       sd->search_similarity_path = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(sd->entry_similarity)));
        if (sd->match_similarity_enable)
                {
                if (!isfile(sd->search_similarity_path))
@@ -2693,7 +2693,7 @@ static void search_start_cb(GtkWidget *, gpointer data)
                {
                if (sd->match_gps != SEARCH_MATCH_NONE)
                        {
-                       entry_text = decode_geo_parameters(gtk_entry_get_text(
+                       entry_text = decode_geo_parameters(gq_gtk_entry_get_text(
                                                                                GTK_ENTRY(sd->entry_gps_coord)));
 
                        sd->search_lat = 1000;
@@ -2750,7 +2750,7 @@ static void search_start_cb(GtkWidget *, gpointer data)
                {
                /* search path */
 
-               path = remove_trailing_slash(gtk_entry_get_text(GTK_ENTRY(sd->path_entry)));
+               path = remove_trailing_slash(gq_gtk_entry_get_text(GTK_ENTRY(sd->path_entry)));
                if (isdir(path))
                        {
                        file_data_unref(sd->search_dir_fd);
@@ -2792,7 +2792,7 @@ static void search_start_cb(GtkWidget *, gpointer data)
                }
        else if (sd->search_type == SEARCH_MATCH_COLLECTION)
                {
-               collection = g_strdup(gtk_entry_get_text(GTK_ENTRY(sd->collection_entry)));
+               collection = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(sd->collection_entry)));
 
                if (is_collection(collection))
                        {
@@ -3246,11 +3246,11 @@ static void select_collection_dialog_ok_cb(FileDialog *fdlg, gpointer data)
        gchar *path_noext;
        gchar *collection;
 
-       path = g_strdup(gtk_entry_get_text(GTK_ENTRY(fdlg->entry)));
+       path = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(fdlg->entry)));
        path_noext = remove_extension_from_path(path);
        collection = g_path_get_basename(path_noext);
 
-       gtk_entry_set_text(GTK_ENTRY(sd->collection_entry), collection);
+       gq_gtk_entry_set_text(GTK_ENTRY(sd->collection_entry), collection);
        file_dialog_close(fdlg);
 
        g_free(path);
@@ -3394,7 +3394,7 @@ void search_new(FileData *dir_fd, FileData *example_file)
 
        sd->collection = pref_box_new(hbox, TRUE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
        sd->collection_entry = gtk_entry_new();
-       gtk_entry_set_text(GTK_ENTRY(sd->collection_entry), "");
+       gq_gtk_entry_set_text(GTK_ENTRY(sd->collection_entry), "");
        gq_gtk_box_pack_start(GTK_BOX(sd->collection), sd->collection_entry, TRUE, TRUE, 0);
        gtk_widget_show(sd->collection_entry);
 
index 6f64a49..26e64f6 100644 (file)
@@ -26,6 +26,7 @@
 #include "ui-bookmark.h"
 
 #include "history-list.h"
+#include "misc.h"
 #include "pixbuf-util.h"
 #include "ui-fileops.h"
 #include "ui-menu.h"
@@ -225,9 +226,9 @@ static void bookmark_edit_ok_cb(GenericDialog *, gpointer data)
        const gchar *icon;
        gchar *new_string;
 
-       name = gtk_entry_get_text(GTK_ENTRY(p->name_entry));
-       path = remove_trailing_slash(gtk_entry_get_text(GTK_ENTRY(p->path_entry)));
-       icon = gtk_entry_get_text(GTK_ENTRY(p->icon_entry));
+       name = gq_gtk_entry_get_text(GTK_ENTRY(p->name_entry));
+       path = remove_trailing_slash(gq_gtk_entry_get_text(GTK_ENTRY(p->path_entry)));
+       icon = gq_gtk_entry_get_text(GTK_ENTRY(p->icon_entry));
 
        new_string = bookmark_string(name, path, icon);
 
@@ -282,7 +283,7 @@ static void bookmark_edit(const gchar *key, const gchar *text, GtkWidget *parent
 
        p->name_entry = gtk_entry_new();
        gtk_widget_set_size_request(p->name_entry, 300, -1);
-       if (p->bb->name) gtk_entry_set_text(GTK_ENTRY(p->name_entry), p->bb->name);
+       if (p->bb->name) gq_gtk_entry_set_text(GTK_ENTRY(p->name_entry), p->bb->name);
        gtk_table_attach_defaults(GTK_TABLE(table), p->name_entry, 1, 2, 0, 1);
        generic_dialog_attach_default(gd, p->name_entry);
        gtk_widget_show(p->name_entry);
@@ -976,7 +977,7 @@ GtkWidget *history_combo_new(GtkWidget **entry, const gchar *text,
 
        if (text)
                {
-               gtk_entry_set_text(GTK_ENTRY(hc->entry), text);
+               gq_gtk_entry_set_text(GTK_ENTRY(hc->entry), text);
                }
        else if (n > 0)
                {
@@ -1008,7 +1009,7 @@ void history_combo_append_history(GtkWidget *widget, const gchar *text)
                }
        else
                {
-               new_text = g_strdup(gtk_entry_get_text(GTK_ENTRY(hc->entry)));
+               new_text = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(hc->entry)));
                }
 
        if (new_text && strlen(new_text) > 0)
index 25eb8f9..699d0fc 100644 (file)
 #include <cstring>
 
 #include "main.h"
+
 #include "history-list.h"
 #include "layout.h"
+#include "misc.h"
 #include "ui-misc.h"
 #include "utilops.h"
 
@@ -1393,7 +1395,7 @@ gchar *text_widget_text_pull(GtkWidget *text_widget)
                }
        else if (GTK_IS_ENTRY(text_widget))
                {
-               return g_strdup(gtk_entry_get_text(GTK_ENTRY(text_widget)));
+               return g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(text_widget)));
                }
        else
                {
@@ -1422,7 +1424,7 @@ gchar *text_widget_text_pull_selected(GtkWidget *text_widget)
                }
        else if (GTK_IS_ENTRY(text_widget))
                {
-               return g_strdup(gtk_entry_get_text(GTK_ENTRY(text_widget)));
+               return g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(text_widget)));
                }
        else
                {
index d3cb6e3..bfbf975 100644 (file)
@@ -28,6 +28,7 @@
 #include "main.h"
 #include "ui-pathsel.h"
 
+#include "misc.h"
 #include "ui-bookmark.h"
 #include "ui-fileops.h"
 #include "ui-menu.h"
@@ -276,7 +277,7 @@ static void dest_change_dir(Dest_Data *dd, const gchar *path, gboolean retain_na
 
        if (retain_name)
                {
-               const gchar *buf = gtk_entry_get_text(GTK_ENTRY(dd->entry));
+               const gchar *buf = gq_gtk_entry_get_text(GTK_ENTRY(dd->entry));
 
                if (!isdir(buf)) old_name = filename_from_path(buf);
                }
@@ -287,7 +288,7 @@ static void dest_change_dir(Dest_Data *dd, const gchar *path, gboolean retain_na
        else
                new_directory = g_strdup(full_path);
 
-       gtk_entry_set_text(GTK_ENTRY(dd->entry), full_path);
+       gq_gtk_entry_set_text(GTK_ENTRY(dd->entry), full_path);
 
        dest_populate(dd, new_directory);
        g_free(new_directory);
@@ -431,10 +432,10 @@ static gint dest_view_rename_cb(TreeEditData *ted, const gchar *old_name, const
 
                gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, new_name, 1, new_path, -1);
 
-               text = gtk_entry_get_text(GTK_ENTRY(dd->entry));
+               text = gq_gtk_entry_get_text(GTK_ENTRY(dd->entry));
                if (text && old_path && strcmp(text, old_path) == 0)
                        {
-                       gtk_entry_set_text(GTK_ENTRY(dd->entry), new_path);
+                       gq_gtk_entry_set_text(GTK_ENTRY(dd->entry), new_path);
                        }
                }
 
@@ -731,7 +732,7 @@ static void file_util_create_dir_cb(gboolean success, const gchar *new_path, gpo
                }
        dd->right_click_path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
 
-       gtk_entry_set_text(GTK_ENTRY(dd->entry), new_path);
+       gq_gtk_entry_set_text(GTK_ENTRY(dd->entry), new_path);
 
        gtk_widget_grab_focus(GTK_WIDGET(dd->entry));
 }
@@ -745,7 +746,7 @@ static void dest_new_dir_cb(GtkWidget *widget, gpointer data)
  * window rather than the file dialog window. gtk_window_present() does not seem to
  * function unless the window was previously minimized.
  */
-       file_util_create_dir(gtk_entry_get_text(GTK_ENTRY(dd->entry)), widget, file_util_create_dir_cb, data);
+       file_util_create_dir(gq_gtk_entry_get_text(GTK_ENTRY(dd->entry)), widget, file_util_create_dir_cb, data);
 }
 
 /*
@@ -774,7 +775,7 @@ static void dest_select_cb(GtkTreeSelection *selection, gpointer data)
                }
        else
                {
-               gtk_entry_set_text(GTK_ENTRY(dd->entry), path);
+               gq_gtk_entry_set_text(GTK_ENTRY(dd->entry), path);
                }
 
        g_free(path);
@@ -831,7 +832,7 @@ static void dest_entry_changed_cb(GtkEditable *, gpointer data)
        const gchar *path;
        gchar *buf;
 
-       path = gtk_entry_get_text(GTK_ENTRY(dd->entry));
+       path = gq_gtk_entry_get_text(GTK_ENTRY(dd->entry));
        if (dd->path && strcmp(path, dd->path) == 0) return;
 
        buf = remove_level_from_path(path);
@@ -863,7 +864,7 @@ static void dest_filter_list_sync(Dest_Data *dd)
        if (!dd->filter_list || !dd->filter_combo) return;
 
        entry = gtk_bin_get_child(GTK_BIN(dd->filter_combo));
-       old_text = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry)));
+       old_text = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(entry)));
 
        store = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(dd->filter_combo)));
        gtk_list_store_clear(store);
@@ -929,7 +930,7 @@ static void dest_filter_add(Dest_Data *dd, const gchar *filter, const gchar *des
                }
        dd->filter_text_list = uig_list_insert_link(dd->filter_text_list, g_list_last(dd->filter_text_list), buf);
 
-       if (set) gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(dd->filter_combo))), filter);
+       if (set) gq_gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(dd->filter_combo))), filter);
        dest_filter_list_sync(dd);
 }
 
@@ -952,7 +953,7 @@ static void dest_filter_changed_cb(GtkEditable *, gpointer data)
        gchar *path;
 
        entry = gtk_bin_get_child(GTK_BIN(dd->filter_combo));
-       buf = gtk_entry_get_text(GTK_ENTRY(entry));
+       buf = gq_gtk_entry_get_text(GTK_ENTRY(entry));
 
        g_free(dd->filter);
        dd->filter = nullptr;
@@ -973,7 +974,7 @@ static void dest_bookmark_select_cb(const gchar *path, gpointer data)
                }
        else if (isfile(path) && dd->f_view)
                {
-               gtk_entry_set_text(GTK_ENTRY(dd->entry), path);
+               gq_gtk_entry_set_text(GTK_ENTRY(dd->entry), path);
                }
 }
 
@@ -1165,7 +1166,7 @@ GtkWidget *path_selection_new_with_files(GtkWidget *entry, const gchar *path,
                dest_filter_clear(dd);
                dest_filter_add(dd, filter, filter_desc, TRUE);
 
-               dd->filter = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(dd->filter_combo)))));
+               dd->filter = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(dd->filter_combo)))));
                }
 
        if (path && path[0] == G_DIR_SEPARATOR && isdir(path))
@@ -1217,7 +1218,7 @@ void path_selection_sync_to_entry_unused(GtkWidget *entry)
 
        if (!dd) return;
 
-       path = gtk_entry_get_text(GTK_ENTRY(entry));
+       path = gq_gtk_entry_get_text(GTK_ENTRY(entry));
 
        if (isdir(path) && (!dd->path || strcmp(path, dd->path) != 0))
                {
index 7ab3501..a652d22 100644 (file)
@@ -159,7 +159,7 @@ static gchar *tab_completion_get_text(TabCompData *td)
 {
        gchar *text;
 
-       text = g_strdup(gtk_entry_get_text(GTK_ENTRY(td->entry)));
+       text = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(td->entry)));
 
        if (text[0] == '~')
                {
@@ -204,7 +204,7 @@ void tab_completion_iter_menu_items(GtkWidget *widget, gpointer data)
        child = gtk_bin_get_child(GTK_BIN(widget));
        if (GTK_IS_LABEL(child)) {
                const gchar *text = gtk_label_get_text(GTK_LABEL(child));
-               const gchar *entry_text = gtk_entry_get_text(GTK_ENTRY(td->entry));
+               const gchar *entry_text = gq_gtk_entry_get_text(GTK_ENTRY(td->entry));
                const gchar *prefix = filename_from_path(entry_text);
                guint prefix_len = strlen(prefix);
 
@@ -266,7 +266,7 @@ static void tab_completion_popup_cb(GtkWidget *widget, gpointer data)
        if (!td) return;
 
        buf = g_build_filename(td->dir_path, name, NULL);
-       gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
+       gq_gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
        gtk_editable_set_position(GTK_EDITABLE(td->entry), strlen(buf));
        g_free(buf);
 
@@ -324,7 +324,7 @@ static gint simple_sort(gconstpointer a, gconstpointer b)
 
 static gboolean tab_completion_do(TabCompData *td)
 {
-       const gchar *entry_text = gtk_entry_get_text(GTK_ENTRY(td->entry));
+       const gchar *entry_text = gq_gtk_entry_get_text(GTK_ENTRY(td->entry));
        const gchar *entry_file;
        gchar *entry_dir;
        gchar *ptr;
@@ -333,7 +333,7 @@ static gboolean tab_completion_do(TabCompData *td)
        if (entry_text[0] == '\0')
                {
                entry_dir = g_strdup(G_DIR_SEPARATOR_S); /** @FIXME root directory win32 */
-               gtk_entry_set_text(GTK_ENTRY(td->entry), entry_dir);
+               gq_gtk_entry_set_text(GTK_ENTRY(td->entry), entry_dir);
                gtk_editable_set_position(GTK_EDITABLE(td->entry), strlen(entry_dir));
                g_free(entry_dir);
                return FALSE;
@@ -354,7 +354,7 @@ static gboolean tab_completion_do(TabCompData *td)
                {
                if (home_exp)
                        {
-                       gtk_entry_set_text(GTK_ENTRY(td->entry), entry_dir);
+                       gq_gtk_entry_set_text(GTK_ENTRY(td->entry), entry_dir);
                        gtk_editable_set_position(GTK_EDITABLE(td->entry), strlen(entry_dir));
                        }
                g_free(entry_dir);
@@ -370,7 +370,7 @@ static gboolean tab_completion_do(TabCompData *td)
                        {
                        if (home_exp)
                                {
-                               gtk_entry_set_text(GTK_ENTRY(td->entry), entry_dir);
+                               gq_gtk_entry_set_text(GTK_ENTRY(td->entry), entry_dir);
                                gtk_editable_set_position(GTK_EDITABLE(td->entry), strlen(entry_dir));
                                }
 
@@ -389,7 +389,7 @@ static gboolean tab_completion_do(TabCompData *td)
                                        g_free(buf);
                                        buf = tmp;
                                        }
-                               gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
+                               gq_gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
                                gtk_editable_set_position(GTK_EDITABLE(td->entry), strlen(buf));
                                g_free(buf);
                                }
@@ -408,7 +408,7 @@ static gboolean tab_completion_do(TabCompData *td)
                else
                        {
                        gchar *buf = g_strconcat(entry_dir, G_DIR_SEPARATOR_S, NULL);
-                       gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
+                       gq_gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
                        gtk_editable_set_position(GTK_EDITABLE(td->entry), strlen(buf));
                        g_free(buf);
                        g_free(entry_dir);
@@ -456,7 +456,7 @@ static gboolean tab_completion_do(TabCompData *td)
                                gchar *buf;
 
                                buf = g_build_filename(entry_dir, file, NULL);
-                               gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
+                               gq_gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
                                gtk_editable_set_position(GTK_EDITABLE(td->entry), strlen(buf));
                                g_free(buf);
                                g_list_free(poss);
@@ -492,7 +492,7 @@ static gboolean tab_completion_do(TabCompData *td)
                                        file = g_strdup(test_file);
                                        file[c] = '\0';
                                        buf = g_build_filename(entry_dir, file, NULL);
-                                       gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
+                                       gq_gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
                                        gtk_editable_set_position(GTK_EDITABLE(td->entry), strlen(buf));
 
 #ifdef TAB_COMPLETION_ENABLE_POPUP_MENU
@@ -660,7 +660,7 @@ GtkWidget *tab_completion_new_with_history(GtkWidget **entry, const gchar *text,
 
        if (text)
                {
-               gtk_entry_set_text(GTK_ENTRY(combo_entry), text);
+               gq_gtk_entry_set_text(GTK_ENTRY(combo_entry), text);
                }
        else if (n > 0)
                {
@@ -681,7 +681,7 @@ const gchar *tab_completion_set_to_last_history(GtkWidget *entry)
        buf = history_list_find_last_path_by_key(td->history_key);
        if (buf)
                {
-               gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
+               gq_gtk_entry_set_text(GTK_ENTRY(td->entry), buf);
                }
 
        return buf;
@@ -730,7 +730,7 @@ GtkWidget *tab_completion_new(GtkWidget **entry, const gchar *text,
        hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
 
        newentry = gtk_entry_new();
-       if (text) gtk_entry_set_text(GTK_ENTRY(newentry), text);
+       if (text) gq_gtk_entry_set_text(GTK_ENTRY(newentry), text);
        gq_gtk_box_pack_start(GTK_BOX(hbox), newentry, TRUE, TRUE, 0);
        gtk_widget_show(newentry);
 
@@ -813,7 +813,7 @@ static void tab_completion_select_ok_cb(FileDialog *fd, gpointer data)
 {
        auto td = static_cast<TabCompData *>(data);
 
-       gtk_entry_set_text(GTK_ENTRY(td->entry), gtk_entry_get_text(GTK_ENTRY(fd->entry)));
+       gq_gtk_entry_set_text(GTK_ENTRY(td->entry), gq_gtk_entry_get_text(GTK_ENTRY(fd->entry)));
 
        tab_completion_select_cancel_cb(fd, data);
 
@@ -858,7 +858,7 @@ static void tab_completion_select_show(TabCompData *td)
                filter_desc = _("All files");
                }
 
-       path = gtk_entry_get_text(GTK_ENTRY(td->entry));
+       path = gq_gtk_entry_get_text(GTK_ENTRY(td->entry));
        if (strlen(path) == 0) path = nullptr;
        if (td->fd_folders_only)
                {
index 0f796c5..131ff8f 100644 (file)
@@ -22,6 +22,8 @@
 #include <cstring>
 
 #include "main.h"
+
+#include "misc.h"
 #include "ui-tree-edit.h"
 
 /*
@@ -47,7 +49,7 @@ static void tree_edit_close(TreeEditData *ted)
 
 static void tree_edit_do(TreeEditData *ted)
 {
-       ted->new_name = g_strdup(gtk_entry_get_text(GTK_ENTRY(ted->entry)));
+       ted->new_name = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(ted->entry)));
 
        if (strcmp(ted->new_name, ted->old_name) != 0)
                {
@@ -232,7 +234,7 @@ gboolean tree_edit_by_path(GtkTreeView *tree, GtkTreePath *tpath, gint column, c
                         G_CALLBACK(tree_edit_key_press_cb), ted);
 
        ted->entry = gtk_entry_new();
-       gtk_entry_set_text(GTK_ENTRY(ted->entry), ted->old_name);
+       gq_gtk_entry_set_text(GTK_ENTRY(ted->entry), ted->old_name);
        gtk_editable_select_region(GTK_EDITABLE(ted->entry), 0, strlen(ted->old_name));
        gq_gtk_container_add(GTK_WIDGET(ted->window), ted->entry);
        gtk_widget_show(ted->entry);
index 91c98d6..03e7c91 100644 (file)
@@ -695,7 +695,7 @@ static void file_dialog_entry_cb(GtkWidget *, gpointer data)
 {
        auto fdlg = static_cast<FileDialog *>(data);
        g_free(fdlg->dest_path);
-       fdlg->dest_path = remove_trailing_slash(gtk_entry_get_text(GTK_ENTRY(fdlg->entry)));
+       fdlg->dest_path = remove_trailing_slash(gq_gtk_entry_get_text(GTK_ENTRY(fdlg->entry)));
 }
 
 static void file_dialog_entry_enter_cb(const gchar *, gpointer data)
@@ -752,7 +752,7 @@ void file_dialog_add_path_widgets(FileDialog *fdlg, const gchar *default_path, c
        gtk_widget_grab_focus(fdlg->entry);
        if (fdlg->dest_path)
                {
-               gtk_entry_set_text(GTK_ENTRY(fdlg->entry), fdlg->dest_path);
+               gq_gtk_entry_set_text(GTK_ENTRY(fdlg->entry), fdlg->dest_path);
                gtk_editable_set_position(GTK_EDITABLE(fdlg->entry), strlen(fdlg->dest_path));
                }
 
index 05ecc1f..f9f3a7f 100644 (file)
@@ -29,6 +29,7 @@
 #include "filefilter.h"
 #include "image.h"
 #include "metadata.h"
+#include "misc.h"
 #include "thumb-standard.h"
 #include "trash.h"
 #include "ui-bookmark.h"
@@ -1162,7 +1163,7 @@ static void file_util_fdlg_cancel_cb(FileDialog *fdlg, gpointer data)
 static void file_util_dest_folder_update_path(UtilityData *ud)
 {
        g_free(ud->dest_path);
-       ud->dest_path = g_strdup(gtk_entry_get_text(GTK_ENTRY(ud->fdlg->entry)));
+       ud->dest_path = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(ud->fdlg->entry)));
 
        switch (ud->type)
                {
@@ -1331,7 +1332,7 @@ static void file_util_rename_preview_update(UtilityData *ud)
                if (gtk_tree_selection_get_selected(selection, &store, &iter))
                        {
                        FileData *fd;
-                       const gchar *dest = gtk_entry_get_text(GTK_ENTRY(ud->rename_entry));
+                       const gchar *dest = gq_gtk_entry_get_text(GTK_ENTRY(ud->rename_entry));
 
                        gtk_tree_model_get(store, &iter, UTILITY_COLUMN_FD, &fd, -1);
                        g_assert(ud->with_sidecars); /* sidecars must be renamed too, it would break the pairing otherwise */
@@ -1361,11 +1362,11 @@ static void file_util_rename_preview_update(UtilityData *ud)
                }
        else
                {
-               front = gtk_entry_get_text(GTK_ENTRY(ud->auto_entry_front));
-               end = gtk_entry_get_text(GTK_ENTRY(ud->auto_entry_end));
+               front = gq_gtk_entry_get_text(GTK_ENTRY(ud->auto_entry_front));
+               end = gq_gtk_entry_get_text(GTK_ENTRY(ud->auto_entry_end));
                padding = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(ud->auto_spin_pad));
 
-               format = gtk_entry_get_text(GTK_ENTRY(ud->format_entry));
+               format = gq_gtk_entry_get_text(GTK_ENTRY(ud->format_entry));
 
                g_free(options->cp_mv_rn.auto_end);
                options->cp_mv_rn.auto_end = g_strdup(end);
@@ -1516,7 +1517,7 @@ static gboolean file_util_preview_cb(GtkTreeSelection *, GtkTreeModel *store,
                gtk_widget_grab_focus(ud->rename_entry);
                gtk_label_set_text(GTK_LABEL(ud->rename_label), fd->name);
                g_signal_handlers_block_by_func(ud->rename_entry, (gpointer)(file_util_rename_preview_entry_cb), ud);
-               gtk_entry_set_text(GTK_ENTRY(ud->rename_entry), name);
+               gq_gtk_entry_set_text(GTK_ENTRY(ud->rename_entry), name);
                gtk_editable_select_region(GTK_EDITABLE(ud->rename_entry), 0, filename_base_length(name));
                g_signal_handlers_unblock_by_func(ud->rename_entry, (gpointer)file_util_rename_preview_entry_cb, ud);
                }
index b17cde0..4c35a23 100644 (file)
@@ -867,7 +867,7 @@ static void vf_marks_tooltip_ok_cb(GenericDialog *gd, gpointer data)
        auto mte = static_cast<MarksTextEntry *>(data);
 
        g_free(options->marks_tooltips[mte->mark_no]);
-       options->marks_tooltips[mte->mark_no] = g_strdup(gtk_entry_get_text(GTK_ENTRY(mte->edit_widget)));
+       options->marks_tooltips[mte->mark_no] = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(mte->edit_widget)));
 
        gtk_widget_set_tooltip_text(mte->parent, options->marks_tooltips[mte->mark_no]);
 
@@ -881,7 +881,7 @@ void vf_marks_filter_on_icon_press(GtkEntry *, GtkEntryIconPosition, GdkEvent *,
 
        g_free(mte->text_entry);
        mte->text_entry = g_strdup("");
-       gtk_entry_set_text(GTK_ENTRY(mte->edit_widget), "");
+       gq_gtk_entry_set_text(GTK_ENTRY(mte->edit_widget), "");
 }
 
 static void vf_marks_tooltip_help_cb(GenericDialog *, gpointer)
@@ -920,7 +920,7 @@ static gboolean vf_marks_tooltip_cb(GtkWidget *widget,
        gtk_widget_set_size_request(mte->edit_widget, 300, -1);
        if (mte->text_entry)
                {
-               gtk_entry_set_text(GTK_ENTRY(mte->edit_widget), mte->text_entry);
+               gq_gtk_entry_set_text(GTK_ENTRY(mte->edit_widget), mte->text_entry);
                }
        gtk_table_attach_defaults(GTK_TABLE(table), mte->edit_widget, 1, 2, 0, 1);
        generic_dialog_attach_default(mte->gd, mte->edit_widget);
@@ -948,7 +948,7 @@ static void vf_file_filter_save_cb(GtkWidget *, gpointer data)
        gboolean text_found = FALSE;
        gint i;
 
-       entry_text = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(vf->file_filter.combo)))));
+       entry_text = g_strdup(gq_gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(vf->file_filter.combo)))));
 
        if (entry_text[0] == '\0' && vf->file_filter.last_selected >= 0)
                {
@@ -960,7 +960,7 @@ static void vf_file_filter_save_cb(GtkWidget *, gpointer data)
 
                gtk_combo_box_set_active(GTK_COMBO_BOX(vf->file_filter.combo), -1);
                vf->file_filter.last_selected = - 1;
-               gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(vf->file_filter.combo))), "");
+               gq_gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(vf->file_filter.combo))), "");
                vf->file_filter.count--;
                }
        else
@@ -1159,7 +1159,7 @@ static void file_filter_clear_cb(GtkEntry *, GtkEntryIconPosition pos, GdkEvent
 {
        if (pos == GTK_ENTRY_ICON_SECONDARY)
                {
-               gtk_entry_set_text(GTK_ENTRY(userdata), "");
+               gq_gtk_entry_set_text(GTK_ENTRY(userdata), "");
                gtk_widget_grab_focus(GTK_WIDGET(userdata));
                }
 }
index fc5a654..c2f05cb 100644 (file)
@@ -336,7 +336,7 @@ static void help_search_window_show_icon_press(GtkEntry *, GtkEntryIconPosition,
 
        g_free(hsd->text_entry);
        hsd->text_entry = g_strdup("");
-       gtk_entry_set_text(GTK_ENTRY(hsd->edit_widget), hsd->text_entry);
+       gq_gtk_entry_set_text(GTK_ENTRY(hsd->edit_widget), hsd->text_entry);
 }
 
 static void help_search_window_ok_cb(GenericDialog *, gpointer data)
@@ -345,7 +345,7 @@ static void help_search_window_ok_cb(GenericDialog *, gpointer data)
        gchar *search_command;
 
        search_command = g_strconcat(options->help_search_engine,
-                                               gtk_entry_get_text(GTK_ENTRY(hsd->edit_widget)),
+                                               gq_gtk_entry_get_text(GTK_ENTRY(hsd->edit_widget)),
                                                NULL);
        help_browser_run(search_command);
        g_free(search_command);