From 48780131a32188263501c094bff8afcbc687e189 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Tue, 25 Oct 2011 21:25:50 +0000 Subject: When implementing labels in TrgDestinationCombo, I somehow overlooked the fact that I made it no longer editable and some work would be needed to make it actually send the directory and not the label. Fixed, I have some more ideas for this widget though. --- src/trg-torrent-move-dialog.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/trg-torrent-move-dialog.c') diff --git a/src/trg-torrent-move-dialog.c b/src/trg-torrent-move-dialog.c index 8ea6802..3f80e72 100644 --- a/src/trg-torrent-move-dialog.c +++ b/src/trg-torrent-move-dialog.c @@ -80,10 +80,7 @@ static void location_changed(GtkWidget * w, gpointer data) { TrgTorrentMoveDialogPrivate *priv = TRG_TORRENT_MOVE_DIALOG_GET_PRIVATE(data); - gchar *location = - gtk_combo_box_get_active_text(GTK_COMBO_BOX(priv->location_combo)); - gtk_widget_set_sensitive(priv->move_button, strlen(location) > 0); - g_free(location); + gtk_widget_set_sensitive(priv->move_button, trg_destination_combo_has_text(TRG_DESTINATION_COMBO(priv->location_combo))); } static GObject *trg_torrent_move_dialog_constructor(GType type, @@ -108,7 +105,7 @@ static GObject *trg_torrent_move_dialog_constructor(GType type, t = hig_workarea_create(); w = priv->location_combo = trg_destination_combo_new(priv->client); - g_signal_connect(w, "changed", G_CALLBACK(location_changed), object); + g_signal_connect(trg_destination_combo_get_entry(TRG_DESTINATION_COMBO(w)), "changed", G_CALLBACK(location_changed), object); hig_workarea_add_row(t, &row, _("Location:"), w, NULL); priv->move_check = -- cgit v1.2.3