[easytag/wip/musicbrainz-support-merge: 67/75] Changed Search ComboBoxText to Search Entry
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/musicbrainz-support-merge: 67/75] Changed Search ComboBoxText to Search Entry
- Date: Fri, 29 Aug 2014 22:27:16 +0000 (UTC)
commit ec9ce2b6520654ee038b3ea0fad753a1bcb4c534
Author: Abhinav <abhijangda hotmail com>
Date: Fri Aug 15 19:40:48 2014 +0530
Changed Search ComboBoxText to Search Entry
data/musicbrainz_dialog.ui | 32 ++++++++++----------------------
src/musicbrainz_dialog.c | 21 ++++++++-------------
2 files changed, 18 insertions(+), 35 deletions(-)
---
diff --git a/data/musicbrainz_dialog.ui b/data/musicbrainz_dialog.ui
index af1c3dd..400bc4e 100755
--- a/data/musicbrainz_dialog.ui
+++ b/data/musicbrainz_dialog.ui
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
- <object class="GtkImage" id="findimage">
+ <object class="GtkImage" id="img_red_lines">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-find</property>
+ <property name="stock">easytag-red-lines</property>
</object>
- <object class="GtkImage" id="img_invert_selection">
+ <object class="GtkImage" id="img_unselect_all">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">easytag-invert-selection</property>
+ <property name="stock">easytag-unselect-all</property>
</object>
- <object class="GtkImage" id="img_red_lines">
+ <object class="GtkImage" id="findimage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">easytag-red-lines</property>
+ <property name="stock">gtk-find</property>
</object>
- <object class="GtkImage" id="img_unselect_all">
+ <object class="GtkImage" id="img_invert_selection">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">easytag-unselect-all</property>
+ <property name="stock">easytag-invert-selection</property>
</object>
<object class="GtkBox" id="mb_box">
<property name="visible">True</property>
@@ -43,26 +43,14 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="cb_manual_search">
- <property name="width_request">190</property>
+ <object class="GtkEntry" id="entry_manual_search">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="has_entry">True</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- <child internal-child="entry">
- <object class="GtkEntry" id="comboboxtext-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="is_focus">True</property>
- </object>
- </child>
+ <property name="invisible_char">●</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="padding">4</property>
<property name="position">1</property>
</packing>
</child>
diff --git a/src/musicbrainz_dialog.c b/src/musicbrainz_dialog.c
index d4ab3d7..70ccde5 100755
--- a/src/musicbrainz_dialog.c
+++ b/src/musicbrainz_dialog.c
@@ -461,7 +461,6 @@ static void
manual_search_callback (GObject *source, GAsyncResult *res,
gpointer user_data)
{
- GtkComboBoxText *combo_box;
EtMusicBrainzDialogPrivate *priv;
EtMusicBrainzDialog *dlg;
GSimpleAsyncResult *simple_async;
@@ -509,10 +508,6 @@ manual_search_callback (GObject *source, GAsyncResult *res,
priv->mb_tree_root);
gtk_statusbar_push (priv->statusbar, 0, _("Searching Completed"));
g_object_unref (res);
- combo_box = GTK_COMBO_BOX_TEXT (gtk_builder_get_object (builder,
- "cb_manual_search"));
- gtk_combo_box_text_append_text (combo_box,
- gtk_combo_box_text_get_active_text (combo_box));
et_music_brainz_dialog_stop_set_sensitive (FALSE);
et_music_brainz_dialog_toolbar_buttons_set_sensitive (TRUE);
@@ -725,7 +720,7 @@ btn_fetch_more_clicked (GtkWidget *btn, gpointer user_data)
static void
btn_manual_find_clicked (GtkWidget *btn, gpointer user_data)
{
- GtkWidget *cb_manual_search;
+ GtkWidget *entry_manual_search;
GtkWidget *cb_manual_search_in;
int type;
ManualSearchThreadData *thread_data;
@@ -744,12 +739,12 @@ btn_manual_find_clicked (GtkWidget *btn, gpointer user_data)
return;
}
- cb_manual_search = GTK_WIDGET (gtk_builder_get_object (builder,
- "cb_manual_search"));
+ entry_manual_search = GTK_WIDGET (gtk_builder_get_object (builder,
+ "entry_manual_search"));
thread_data = g_slice_new (ManualSearchThreadData);
thread_data->type = type;
thread_data->node = g_node_new (NULL);
- thread_data->text_to_search = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (cb_manual_search));
+ thread_data->text_to_search = (gchar *)gtk_entry_get_text (GTK_ENTRY (entry_manual_search));
mb5_search_cancellable = g_cancellable_new ();
gtk_statusbar_push (mb_dialog_priv->statusbar, 0,
_("Starting MusicBrainz Search"));
@@ -2527,7 +2522,7 @@ et_musicbrainz_dialog_init (EtMusicBrainzDialog *dialog)
{
EtMusicBrainzDialogPrivate *priv;
GtkWidget *cb_manual_search_in;
- GtkWidget *cb_search;
+ GtkWidget *entry_manual_search;
GtkWidget *box;
GError *error;
ET_File *et_file;
@@ -2564,10 +2559,10 @@ et_musicbrainz_dialog_init (EtMusicBrainzDialog *dialog)
gtk_box_pack_start (GTK_BOX (gtk_builder_get_object (builder, "central_box")),
priv->entityView, TRUE, TRUE, 2);
et_initialize_tag_choice_dialog (priv);
- cb_search = GTK_WIDGET (gtk_builder_get_object (builder, "cb_manual_search"));
+ entry_manual_search = GTK_WIDGET (gtk_builder_get_object (builder, "entry_manual_search"));
/* Set callback functions */
- g_signal_connect (gtk_bin_get_child (GTK_BIN (cb_search)), "activate",
+ g_signal_connect (entry_manual_search, "activate",
G_CALLBACK (btn_manual_find_clicked), NULL);
g_signal_connect (gtk_builder_get_object (builder, "btn_manual_find"),
"clicked", G_CALLBACK (btn_manual_find_clicked),
@@ -2637,7 +2632,7 @@ et_musicbrainz_dialog_init (EtMusicBrainzDialog *dialog)
if (et_file && ((File_Tag *)et_file->FileTag->data)->album)
{
- gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (cb_search))),
+ gtk_entry_set_text (GTK_ENTRY (entry_manual_search),
((File_Tag *)et_file->FileTag->data)->album);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]