#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
/*
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);
}
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);
}
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);
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);
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);
#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);
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);
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, ",");
}
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)
#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"
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)
#include "cache-loader.h"
#include "filedata.h"
#include "layout.h"
+#include "misc.h"
#include "pixbuf-util.h"
#include "thumb.h"
#include "thumb-standard.h"
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);
{
buf = "...";
}
- gtk_entry_set_text(GTK_ENTRY(cm->entry), buf);
+ gq_gtk_entry_set_text(GTK_ENTRY(cm->entry), buf);
}
return G_SOURCE_CONTINUE;
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);
{
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);
}
{
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);
}
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);
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))
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);
{
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);
}
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);
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);
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))
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);
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))
#include "collect-dlg.h"
#include "collect-io.h"
-#include "utilops.h"
+#include "misc.h"
#include "ui-fileops.h"
+#include "utilops.h"
enum {
DIALOG_SAVE,
{
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);
}
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);
}
#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
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])
{
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)
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);
{
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),
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)
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);
#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
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);
/* 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)
{
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);
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)
{
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);
}
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);
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)
{
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);
}
}
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);
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);
}
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);
}
}
}
#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
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);
#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)
{
// 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.
{
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);
}
#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)
{
{
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);
}
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)
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)
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);
{
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), "");
}
}
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);
}
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);
}
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])
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);
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);
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);
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);
{
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);
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);
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))
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);
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);
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),"");
}
}
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));
}
if (info == TARGET_TEXT_PLAIN)
{
- gtk_entry_set_text(GTK_ENTRY(sd->path_entry),"");
+ gq_gtk_entry_set_text(GTK_ENTRY(sd->path_entry),"");
}
}
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));
}
if (info == TARGET_TEXT_PLAIN)
{
- gtk_entry_set_text(GTK_ENTRY(sd->entry_similarity),"");
+ gq_gtk_entry_set_text(GTK_ENTRY(sd->entry_similarity),"");
}
}
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))
{
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;
{
/* 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);
}
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))
{
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);
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);
#include "ui-bookmark.h"
#include "history-list.h"
+#include "misc.h"
#include "pixbuf-util.h"
#include "ui-fileops.h"
#include "ui-menu.h"
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);
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);
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)
{
}
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)
#include <cstring>
#include "main.h"
+
#include "history-list.h"
#include "layout.h"
+#include "misc.h"
#include "ui-misc.h"
#include "utilops.h"
}
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
{
}
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
{
#include "main.h"
#include "ui-pathsel.h"
+#include "misc.h"
#include "ui-bookmark.h"
#include "ui-fileops.h"
#include "ui-menu.h"
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);
}
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);
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);
}
}
}
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));
}
* 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);
}
/*
}
else
{
- gtk_entry_set_text(GTK_ENTRY(dd->entry), path);
+ gq_gtk_entry_set_text(GTK_ENTRY(dd->entry), path);
}
g_free(path);
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);
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);
}
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);
}
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;
}
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);
}
}
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))
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))
{
{
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] == '~')
{
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);
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);
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;
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;
{
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);
{
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(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);
}
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);
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);
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
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)
{
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;
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);
{
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);
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)
{
#include <cstring>
#include "main.h"
+
+#include "misc.h"
#include "ui-tree-edit.h"
/*
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)
{
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);
{
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)
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));
}
#include "filefilter.h"
#include "image.h"
#include "metadata.h"
+#include "misc.h"
#include "thumb-standard.h"
#include "trash.h"
#include "ui-bookmark.h"
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)
{
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 */
}
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);
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);
}
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]);
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)
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);
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)
{
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
{
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));
}
}
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)
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);