From 665e231ceb850f86ceedf80cdb6d13cca52671bf Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Wed, 11 May 2011 09:21:11 +0000 Subject: put the destination combo into its own class, changing from the deprecated combo_box_entry_new_text or whatever it is and using it in torrent move dialog also. --- src/Makefile.am | 1 + src/torrent.c | 2 +- src/trg-destination-combo.c | 180 +++++++++++++++++++++++++++++++++++ src/trg-destination-combo.h | 53 +++++++++++ src/trg-main-window.c | 3 +- src/trg-peers-tree-view.c | 2 +- src/trg-preferences.c | 2 +- src/trg-state-selector.c | 3 +- src/trg-stats-dialog.c | 2 +- src/trg-stats-dialog.h | 2 +- src/trg-torrent-add-dialog.c | 68 ++------------ src/trg-torrent-move-dialog.c | 194 +++++++++++++++++++++++++++++--------- src/trg-torrent-props-dialog.c | 6 +- src/trg-trackers-tree-view.c | 9 +- src/trg-tree-view.c | 6 +- src/trg-tree-view.h | 2 +- src/util.c | 1 + src/util.h | 2 + transmission-remote-gtk.pot | 208 ++++++++++++++++++++--------------------- 19 files changed, 515 insertions(+), 231 deletions(-) create mode 100644 src/trg-destination-combo.c create mode 100644 src/trg-destination-combo.h diff --git a/src/Makefile.am b/src/Makefile.am index ab258c3..5756834 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -74,6 +74,7 @@ transmission_remote_gtk_SOURCES = main.c \ trg-file-parser.c \ bencode.c \ trg-preferences.c \ + trg-destination-combo.c \ $(NULL) transmission_remote_gtk_LDFLAGS = -lm -lcurl $(jsonglib_LIBS) $(gtk_LIBS) $(gthread_LIBS) $(GEOIP_LIBS) $(gconf_LIBS) $(gio_LIBS) $(unique_LIBS) $(notify_LIBS) $(libproxy_LIBS) diff --git a/src/torrent.c b/src/torrent.c index 032e9b7..1d3d247 100644 --- a/src/torrent.c +++ b/src/torrent.c @@ -227,7 +227,7 @@ gboolean torrent_has_tracker(JsonObject * t, GRegex * rx, gchar * search) GList *li; for (li = trackers; li; li = g_list_next(li)) { - JsonObject *tracker = json_node_get_object((JsonNode*)li->data); + JsonObject *tracker = json_node_get_object((JsonNode *) li->data); const gchar *trackerAnnounce = tracker_get_announce(tracker); gchar *trackerAnnounceHost = trg_gregex_get_first(rx, trackerAnnounce); diff --git a/src/trg-destination-combo.c b/src/trg-destination-combo.c new file mode 100644 index 0000000..87ce934 --- /dev/null +++ b/src/trg-destination-combo.c @@ -0,0 +1,180 @@ +/* + * transmission-remote-gtk - Transmission RPC client for GTK + * Copyright (C) 2010 Alan Fitton + + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include + +#include "trg-client.h" +#include "torrent.h" +#include "trg-torrent-model.h" +#include "trg-destination-combo.h" +#include "util.h" + +G_DEFINE_TYPE(TrgDestinationCombo, trg_destination_combo, + GTK_TYPE_COMBO_BOX_ENTRY) +#define TRG_DESTINATION_COMBO_GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRG_TYPE_DESTINATION_COMBO, TrgDestinationComboPrivate)) +typedef struct _TrgDestinationComboPrivate TrgDestinationComboPrivate; + +struct _TrgDestinationComboPrivate { + trg_client *client; +}; + +enum { + PROP_0, + PROP_CLIENT +}; + +static void +trg_destination_combo_get_property(GObject * object, guint property_id, + GValue * value, GParamSpec * pspec) +{ + TrgDestinationComboPrivate *priv = + TRG_DESTINATION_COMBO_GET_PRIVATE(object); + switch (property_id) { + case PROP_CLIENT: + g_value_set_pointer(value, priv->client); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); + } +} + +static void +trg_destination_combo_set_property(GObject * object, guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + TrgDestinationComboPrivate *priv = + TRG_DESTINATION_COMBO_GET_PRIVATE(object); + switch (property_id) { + case PROP_CLIENT: + priv->client = g_value_get_pointer(value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); + } +} + +static GObject *trg_destination_combo_constructor(GType type, + guint + n_construct_properties, + GObjectConstructParam + * construct_params) +{ + GObject *object = G_OBJECT_CLASS + (trg_destination_combo_parent_class)->constructor(type, + n_construct_properties, + construct_params); + + TrgDestinationComboPrivate *priv = + TRG_DESTINATION_COMBO_GET_PRIVATE(object); + trg_client *client = priv->client; + + const gchar *defaultDownDir = + json_object_get_string_member(client->session, SGET_DOWNLOAD_DIR); + + GtkListStore *comboModel = gtk_list_store_new(1, G_TYPE_STRING); + + GSList *dirs = NULL; + GSList *sli; + GList *li; + GList *torrentItemRefs; + + GtkTreeRowReference *rr; + GtkTreeModel *model; + GtkTreePath *path; + JsonObject *t; + + g_slist_str_set_add(&dirs, defaultDownDir); + + g_mutex_lock(client->updateMutex); + torrentItemRefs = g_hash_table_get_values(client->torrentTable); + for (li = torrentItemRefs; li; li = g_list_next(li)) { + rr = (GtkTreeRowReference *) li->data; + model = gtk_tree_row_reference_get_model(rr); + path = gtk_tree_row_reference_get_path(rr); + + if (path) { + GtkTreeIter iter; + if (gtk_tree_model_get_iter(model, &iter, path)) { + const gchar *dd; + gtk_tree_model_get(model, &iter, TORRENT_COLUMN_JSON, &t, + -1); + dd = torrent_get_download_dir(t); + if (dd) + g_slist_str_set_add(&dirs, dd); + + } + gtk_tree_path_free(path); + } + } + + g_list_free(torrentItemRefs); + g_mutex_unlock(client->updateMutex); + + for (sli = dirs; sli != NULL; sli = g_slist_next(sli)) + gtk_list_store_insert_with_values(comboModel, NULL, INT_MAX, 0, + (gchar *) sli->data, -1); + + g_str_slist_free(dirs); + + gtk_combo_box_set_model(GTK_COMBO_BOX(object), + GTK_TREE_MODEL(comboModel)); + + gtk_combo_box_entry_set_text_column(GTK_COMBO_BOX_ENTRY(object), 0); + + /* cleanup */ + g_object_unref(comboModel); + + return object; +} + +static void +trg_destination_combo_class_init(TrgDestinationComboClass * klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS(klass); + + g_type_class_add_private(klass, sizeof(TrgDestinationComboPrivate)); + + object_class->get_property = trg_destination_combo_get_property; + object_class->set_property = trg_destination_combo_set_property; + object_class->constructor = trg_destination_combo_constructor; + + g_object_class_install_property(object_class, + PROP_CLIENT, + g_param_spec_pointer + ("trg-client", "TClient", + "Client", + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB)); + +} + +static void trg_destination_combo_init(TrgDestinationCombo * self) +{ +} + +GtkWidget *trg_destination_combo_new(trg_client * client) +{ + return GTK_WIDGET(g_object_new(TRG_TYPE_DESTINATION_COMBO, + "trg-client", client, NULL)); +} diff --git a/src/trg-destination-combo.h b/src/trg-destination-combo.h new file mode 100644 index 0000000..d93300d --- /dev/null +++ b/src/trg-destination-combo.h @@ -0,0 +1,53 @@ +/* + * transmission-remote-gtk - Transmission RPC client for GTK + * Copyright (C) 2010 Alan Fitton + + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef TRG_DESTINATION_COMBO_H_ +#define TRG_DESTINATION_COMBO_H_ + +#include +#include + +#include "trg-client.h" + +G_BEGIN_DECLS +#define TRG_TYPE_DESTINATION_COMBO trg_destination_combo_get_type() +#define TRG_DESTINATION_COMBO(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRG_TYPE_DESTINATION_COMBO, TrgDestinationCombo)) +#define TRG_DESTINATION_COMBO_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), TRG_TYPE_DESTINATION_COMBO, TrgDestinationComboClass)) +#define TRG_IS_DESTINATION_COMBO(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRG_TYPE_DESTINATION_COMBO)) +#define TRG_IS_DESTINATION_COMBO_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), TRG_TYPE_DESTINATION_COMBO)) +#define TRG_DESTINATION_COMBO_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), TRG_TYPE_DESTINATION_COMBO, TrgDestinationComboClass)) + typedef struct { + GtkComboBoxEntry parent; +} TrgDestinationCombo; + +typedef struct { + GtkComboBoxEntryClass parent_class; +} TrgDestinationComboClass; + +GType trg_destination_combo_get_type(void); + +GtkWidget *trg_destination_combo_new(trg_client * client); + +G_END_DECLS +#endif /* TRG_DESTINATION_COMBO_H_ */ diff --git a/src/trg-main-window.c b/src/trg-main-window.c index 39553fd..2975614 100644 --- a/src/trg-main-window.c +++ b/src/trg-main-window.c @@ -262,8 +262,7 @@ static void update_selected_torrent_notebook(TrgMainWindow * win, JsonObject *t; GtkTreeIter iter; - if (id >= 0 - && get_torrent_data(client->torrentTable, id, &t, &iter)) { + if (id >= 0 && get_torrent_data(client->torrentTable, id, &t, &iter)) { trg_toolbar_torrent_actions_sensitive(priv->toolBar, TRUE); trg_menu_bar_torrent_actions_sensitive(priv->menuBar, TRUE); trg_general_panel_update(priv->genDetails, t, &iter); diff --git a/src/trg-peers-tree-view.c b/src/trg-peers-tree-view.c index c4f9c32..8d160d1 100644 --- a/src/trg-peers-tree-view.c +++ b/src/trg-peers-tree-view.c @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * 51 Franklin Streef, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H diff --git a/src/trg-preferences.c b/src/trg-preferences.c index 6d53007..8c7fafe 100644 --- a/src/trg-preferences.c +++ b/src/trg-preferences.c @@ -1,6 +1,6 @@ /* * transmission-remote-gtk - Transmission RPC client for GTK - * Copyright (C) 2010 Alan Fitton + * Copyright (C) 2011 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/trg-state-selector.c b/src/trg-state-selector.c index 85b6ade..81ffc84 100644 --- a/src/trg-state-selector.c +++ b/src/trg-state-selector.c @@ -457,7 +457,8 @@ static void trg_state_selector_init(TrgStateSelector * self) g_signal_connect(self, "popup-menu", G_CALLBACK(view_onPopupMenu), NULL); - gtk_tree_view_set_search_column(GTK_TREE_VIEW(self), STATE_SELECTOR_NAME); + gtk_tree_view_set_search_column(GTK_TREE_VIEW(self), + STATE_SELECTOR_NAME); } TrgStateSelector *trg_state_selector_new(trg_client * client) diff --git a/src/trg-stats-dialog.c b/src/trg-stats-dialog.c index 42eab66..d5b6561 100644 --- a/src/trg-stats-dialog.c +++ b/src/trg-stats-dialog.c @@ -1,6 +1,6 @@ /* * transmission-remote-gtk - Transmission RPC client for GTK - * Copyright (C) 2010 Alan Fitton + * Copyright (C) 2011 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/trg-stats-dialog.h b/src/trg-stats-dialog.h index acdbc55..1353d68 100644 --- a/src/trg-stats-dialog.h +++ b/src/trg-stats-dialog.h @@ -1,6 +1,6 @@ /* * transmission-remote-gtk - Transmission RPC client for GTK - * Copyright (C) 2010 Alan Fitton + * Copyright (C) 2011 Alan Fitton * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/trg-torrent-add-dialog.c b/src/trg-torrent-add-dialog.c index 4604a8e..4282cc7 100644 --- a/src/trg-torrent-add-dialog.c +++ b/src/trg-torrent-add-dialog.c @@ -35,6 +35,7 @@ #include "trg-file-parser.h" #include "trg-torrent-add-dialog.h" #include "trg-cell-renderer-size.h" +#include "trg-destination-combo.h" #include "trg-preferences.h" #include "requests.h" #include "torrent.h" @@ -165,63 +166,6 @@ static gpointer add_files_threadfunc(gpointer data) return NULL; } -static gchar *trg_destination_folder_get(GtkComboBox * box) -{ - return gtk_combo_box_get_active_text(box); -} - -static GtkWidget *trg_destination_folder_new(trg_client * client) -{ - const gchar *defaultDownDir = - json_object_get_string_member(client->session, SGET_DOWNLOAD_DIR); - GtkWidget *combo = gtk_combo_box_entry_new_text(); - GSList *dirs = NULL; - GSList *sli; - GList *li; - GList *torrentItemRefs; - - GtkTreeRowReference *rr; - GtkTreeModel *model; - GtkTreePath *path; - JsonObject *t; - - g_slist_str_set_add(&dirs, defaultDownDir); - - g_mutex_lock(client->updateMutex); - torrentItemRefs = g_hash_table_get_values(client->torrentTable); - for (li = torrentItemRefs; li; li = g_list_next(li)) { - rr = (GtkTreeRowReference *) li->data; - model = gtk_tree_row_reference_get_model(rr); - path = gtk_tree_row_reference_get_path(rr); - - if (path) { - GtkTreeIter iter; - if (gtk_tree_model_get_iter(model, &iter, path)) { - const gchar *dd; - gtk_tree_model_get(model, &iter, TORRENT_COLUMN_JSON, &t, - -1); - dd = torrent_get_download_dir(t); - if (dd) - g_slist_str_set_add(&dirs, dd); - - } - gtk_tree_path_free(path); - } - } - - g_list_free(torrentItemRefs); - g_mutex_unlock(client->updateMutex); - - for (sli = dirs; sli != NULL; sli = g_slist_next(sli)) - gtk_combo_box_append_text(GTK_COMBO_BOX(combo), - (gchar *) sli->data); - - gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0); - g_str_slist_free(dirs); - - return combo; -} - void launch_add_thread(struct add_torrent_threadfunc_args *args) { GError *error = NULL; @@ -279,7 +223,7 @@ trg_torrent_add_response_cb(GtkDialog * dlg, gint res_id, gpointer data) gtk_combo_box_get_active(GTK_COMBO_BOX(priv->priority_combo)) - 1; gchar *dir = - trg_destination_folder_get(GTK_COMBO_BOX(priv->dest_combo)); + gtk_combo_box_get_active_text(GTK_COMBO_BOX(priv->dest_combo)); if (g_slist_length(priv->filenames) == 1) { JsonNode *req = @@ -624,6 +568,7 @@ GtkWidget *gtr_file_list_new(GtkTreeStore ** store) G_TYPE_INT); /* dl enabled */ gtk_tree_view_set_model(tree_view, GTK_TREE_MODEL(*store)); + g_object_unref(G_OBJECT(*store)); /* create the scrolled window and stick the view in it */ scroll = gtk_scrolled_window_new(NULL, NULL); @@ -891,8 +836,8 @@ static GObject *trg_torrent_add_dialog_constructor(GType type, priv->paused_check = gtk_check_button_new_with_mnemonic(_("Start _paused")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->paused_check), - pref_get_start_paused(priv-> - client->gconf)); + pref_get_start_paused(priv->client-> + gconf)); priv->priority_combo = gtr_priority_combo_new(); gtk_combo_box_set_active(GTK_COMBO_BOX(priv->priority_combo), 1); @@ -922,8 +867,9 @@ static GObject *trg_torrent_add_dialog_constructor(GType type, gtk_table_attach(GTK_TABLE(t), l, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0); ++col; - priv->dest_combo = trg_destination_folder_new(priv->client); + priv->dest_combo = trg_destination_combo_new(priv->client); + gtk_combo_box_set_active(GTK_COMBO_BOX(priv->dest_combo), 0); gtk_table_attach(GTK_TABLE(t), priv->dest_combo, col, col + 1, row, row + 1, ~0, 0, 0, 0); gtk_label_set_mnemonic_widget(GTK_LABEL(l), priv->dest_combo); diff --git a/src/trg-torrent-move-dialog.c b/src/trg-torrent-move-dialog.c index b10a471..d683663 100644 --- a/src/trg-torrent-move-dialog.c +++ b/src/trg-torrent-move-dialog.c @@ -25,6 +25,7 @@ #include "trg-client.h" #include "trg-main-window.h" #include "trg-torrent-move-dialog.h" +#include "trg-destination-combo.h" #include "hig.h" #include "torrent.h" #include "requests.h" @@ -40,15 +41,17 @@ typedef struct _TrgTorrentMoveDialogPrivate struct _TrgTorrentMoveDialogPrivate { trg_client *client; TrgMainWindow *win; + TrgTorrentTreeView *treeview; JsonArray *ids; GtkWidget *location_combo, *move_check, *move_button; }; -static void -trg_torrent_move_dialog_class_init(TrgTorrentMoveDialogClass * klass) -{ - g_type_class_add_private(klass, sizeof(TrgTorrentMoveDialogPrivate)); -} +enum { + PROP_0, + PROP_CLIENT, + PROP_PARENT_WINDOW, + PROP_TREEVIEW +}; static void trg_torrent_move_response_cb(GtkDialog * dlg, gint res_id, gpointer data) @@ -84,86 +87,187 @@ static void location_changed(GtkWidget * w, gpointer data) g_free(location); } -static void trg_torrent_move_dialog_init(TrgTorrentMoveDialog * self) +static GObject *trg_torrent_move_dialog_constructor(GType type, + guint + n_construct_properties, + GObjectConstructParam + * construct_params) { + GObject *object = G_OBJECT_CLASS + (trg_torrent_move_dialog_parent_class)->constructor(type, + n_construct_properties, + construct_params); TrgTorrentMoveDialogPrivate *priv = - TRG_TORRENT_MOVE_DIALOG_GET_PRIVATE(self); + TRG_TORRENT_MOVE_DIALOG_GET_PRIVATE(object); + + gint count; + gchar *msg; + GtkWidget *w, *t; gint row = 0; t = hig_workarea_create(); - w = priv->location_combo = gtk_combo_box_entry_new_text(); - g_signal_connect(w, "changed", G_CALLBACK(location_changed), self); + w = priv->location_combo = trg_destination_combo_new(priv->client); + g_signal_connect(w, "changed", G_CALLBACK(location_changed), object); hig_workarea_add_row(t, &row, _("Location:"), w, NULL); priv->move_check = hig_workarea_add_wide_checkbutton(t, &row, _("Move"), TRUE); - gtk_window_set_destroy_with_parent(GTK_WINDOW(self), TRUE); + gtk_window_set_destroy_with_parent(GTK_WINDOW(object), TRUE); - gtk_dialog_add_button(GTK_DIALOG(self), GTK_STOCK_CLOSE, + gtk_dialog_add_button(GTK_DIALOG(object), GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL); priv->move_button = - gtk_dialog_add_button(GTK_DIALOG(self), _("Move"), + gtk_dialog_add_button(GTK_DIALOG(object), _("Move"), GTK_RESPONSE_ACCEPT); gtk_widget_set_sensitive(priv->move_button, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(self), GUI_PAD); + gtk_container_set_border_width(GTK_CONTAINER(object), GUI_PAD); - gtk_dialog_set_default_response(GTK_DIALOG(self), GTK_RESPONSE_ACCEPT); + gtk_dialog_set_default_response(GTK_DIALOG(object), + GTK_RESPONSE_ACCEPT); - gtk_dialog_set_alternative_button_order(GTK_DIALOG(self), + gtk_dialog_set_alternative_button_order(GTK_DIALOG(object), GTK_RESPONSE_ACCEPT, GTK_RESPONSE_CANCEL, -1); gtk_container_set_border_width(GTK_CONTAINER(t), GUI_PAD); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(self)->vbox), t, TRUE, TRUE, 0); -} - -TrgTorrentMoveDialog *trg_torrent_move_dialog_new(TrgMainWindow * win, - trg_client * client, - TrgTorrentTreeView * ttv) -{ - GObject *obj = g_object_new(TRG_TYPE_TORRENT_MOVE_DIALOG, NULL); - TrgTorrentMoveDialogPrivate *priv = - TRG_TORRENT_MOVE_DIALOG_GET_PRIVATE(obj); - - gint count; - gchar *msg; - - priv->client = client; - priv->win = win; - priv->ids = build_json_id_array(ttv); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(object)->vbox), t, TRUE, TRUE, + 0); count = gtk_tree_selection_count_selected_rows(gtk_tree_view_get_selection - (GTK_TREE_VIEW(ttv))); + (GTK_TREE_VIEW + (priv->treeview))); + priv->ids = build_json_id_array(priv->treeview); if (count == 1) { JsonObject *json; const gchar *name; - const gchar *current_location; - get_torrent_data(client->torrentTable, - trg_mw_get_selected_torrent_id(win), &json, NULL); + get_torrent_data(priv->client->torrentTable, + trg_mw_get_selected_torrent_id(priv->win), &json, + NULL); name = torrent_get_name(json); - current_location = torrent_get_download_dir(json); - gtk_combo_box_append_text(GTK_COMBO_BOX(priv->location_combo), - current_location); - gtk_combo_box_set_active(GTK_COMBO_BOX(priv->location_combo), 0); msg = g_strdup_printf(_("Move %s"), name); } else { msg = g_strdup_printf(_("Move %d torrents"), count); } - gtk_window_set_transient_for(GTK_WINDOW(obj), GTK_WINDOW(win)); - gtk_window_set_title(GTK_WINDOW(obj), msg); + gtk_window_set_transient_for(GTK_WINDOW(object), + GTK_WINDOW(priv->win)); + gtk_window_set_title(GTK_WINDOW(object), msg); - g_signal_connect(G_OBJECT(obj), + g_signal_connect(G_OBJECT(object), "response", - G_CALLBACK(trg_torrent_move_response_cb), win); + G_CALLBACK(trg_torrent_move_response_cb), priv->win); + + return object; +} - return TRG_TORRENT_MOVE_DIALOG(obj); +static void +trg_torrent_move_dialog_get_property(GObject * object, guint property_id, + GValue * value, GParamSpec * pspec) +{ + TrgTorrentMoveDialogPrivate *priv = + TRG_TORRENT_MOVE_DIALOG_GET_PRIVATE(object); + switch (property_id) { + case PROP_CLIENT: + g_value_set_pointer(value, priv->client); + break; + case PROP_PARENT_WINDOW: + g_value_set_object(value, priv->win); + break; + case PROP_TREEVIEW: + g_value_set_object(value, priv->treeview); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); + } +} + +static void +trg_torrent_move_dialog_set_property(GObject * object, guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + TrgTorrentMoveDialogPrivate *priv = + TRG_TORRENT_MOVE_DIALOG_GET_PRIVATE(object); + switch (property_id) { + case PROP_CLIENT: + priv->client = g_value_get_pointer(value); + break; + case PROP_PARENT_WINDOW: + priv->win = g_value_get_object(value); + break; + case PROP_TREEVIEW: + priv->treeview = g_value_get_object(value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); + } +} + +static void +trg_torrent_move_dialog_class_init(TrgTorrentMoveDialogClass * klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS(klass); + + g_type_class_add_private(klass, sizeof(TrgTorrentMoveDialogPrivate)); + + object_class->get_property = trg_torrent_move_dialog_get_property; + object_class->set_property = trg_torrent_move_dialog_set_property; + object_class->constructor = trg_torrent_move_dialog_constructor; + + g_object_class_install_property(object_class, + PROP_TREEVIEW, + g_param_spec_object + ("torrent-tree-view", + "TrgTorrentTreeView", + "TrgTorrentTreeView", + TRG_TYPE_TORRENT_TREE_VIEW, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB)); + + g_object_class_install_property(object_class, + PROP_PARENT_WINDOW, + g_param_spec_object + ("parent-window", "Parent window", + "Parent window", TRG_TYPE_MAIN_WINDOW, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB)); + + g_object_class_install_property(object_class, + PROP_CLIENT, + g_param_spec_pointer + ("trg-client", "TClient", + "Client", + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB)); +} + +static void trg_torrent_move_dialog_init(TrgTorrentMoveDialog * self) +{ +} + +TrgTorrentMoveDialog *trg_torrent_move_dialog_new(TrgMainWindow * win, + trg_client * client, + TrgTorrentTreeView * ttv) +{ + return g_object_new(TRG_TYPE_TORRENT_MOVE_DIALOG, + "trg-client", client, + "torrent-tree-view", ttv, + "parent-window", win, NULL); } diff --git a/src/trg-torrent-props-dialog.c b/src/trg-torrent-props-dialog.c index 9b82297..d50bd89 100644 --- a/src/trg-torrent-props-dialog.c +++ b/src/trg-torrent-props-dialog.c @@ -139,12 +139,10 @@ trg_torrent_props_response_cb(GtkDialog * dlg, gint res_id, (priv->seedRatioLimit), args); json_object_set_int_member(args, FIELD_SEED_RATIO_MODE, gtk_combo_box_get_active(GTK_COMBO_BOX - (priv-> - seedRatioMode))); + (priv->seedRatioMode))); json_object_set_int_member(args, FIELD_BANDWIDTH_PRIORITY, gtk_combo_box_get_active(GTK_COMBO_BOX - (priv-> - bandwidthPriorityCombo)) + (priv->bandwidthPriorityCombo)) - 1); gtk_spin_button_json_int_out(GTK_SPIN_BUTTON diff --git a/src/trg-trackers-tree-view.c b/src/trg-trackers-tree-view.c index ea4d703..a543078 100644 --- a/src/trg-trackers-tree-view.c +++ b/src/trg-trackers-tree-view.c @@ -125,7 +125,8 @@ static void trg_tracker_announce_editing_started(GtkCellRenderer * renderer G_GNUC_UNUSED, GtkCellEditable * editable G_GNUC_UNUSED, - gchar * path G_GNUC_UNUSED, + gchar * + path G_GNUC_UNUSED, gpointer user_data) { TrgTrackersModel *model = @@ -135,7 +136,8 @@ static void trg_tracker_announce_editing_started(GtkCellRenderer * trg_trackers_model_set_accept(model, FALSE); } -static void trg_tracker_announce_editing_canceled(GtkWidget * w G_GNUC_UNUSED, +static void trg_tracker_announce_editing_canceled(GtkWidget * + w G_GNUC_UNUSED, gpointer data) { TrgTrackersModel *model = @@ -153,7 +155,8 @@ static void trg_trackers_tree_view_init(TrgTrackersTreeView * self) desc = trg_tree_view_reg_column(ttv, TRG_COLTYPE_ICONTEXT, - TRACKERCOL_TIER, _("Tier"), "tier", TRG_COLUMN_UNREMOVABLE); + TRACKERCOL_TIER, _("Tier"), "tier", + TRG_COLUMN_UNREMOVABLE); desc->model_column_icon = TRACKERCOL_ICON; desc = diff --git a/src/trg-tree-view.c b/src/trg-tree-view.c index 07188ac..0bf9f5b 100644 --- a/src/trg-tree-view.c +++ b/src/trg-tree-view.c @@ -145,7 +145,8 @@ view_popup_menu(GtkButton * button, GdkEventButton * event, gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), TRUE); g_signal_connect(menuitem, "activate", G_CALLBACK(trg_tree_view_hide_column), column); - gtk_widget_set_sensitive(menuitem, !(desc->flags & TRG_COLUMN_UNREMOVABLE)); + gtk_widget_set_sensitive(menuitem, + !(desc->flags & TRG_COLUMN_UNREMOVABLE)); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); for (li = priv->columns; li; li = g_list_next(li)) { @@ -189,8 +190,7 @@ static void trg_tree_view_add_column_after(TrgTreeView * tv, switch (desc->type) { case TRG_COLTYPE_TEXT: renderer = - desc-> - customRenderer ? desc->customRenderer : + desc->customRenderer ? desc->customRenderer : gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(desc->header, diff --git a/src/trg-tree-view.h b/src/trg-tree-view.h index 74f3adc..8418ae2 100644 --- a/src/trg-tree-view.h +++ b/src/trg-tree-view.h @@ -75,7 +75,7 @@ typedef struct { #define TRG_COLUMN_DEFAULT 0x00 #define TRG_COLUMN_SHOWING (1 << 0) /* 0x01 */ -#define TRG_COLUMN_UNREMOVABLE (1 << 1) /* 0x02 */ +#define TRG_COLUMN_UNREMOVABLE (1 << 1) /* 0x02 */ #define TRG_COLUMN_EXTRA (1 << 2) /* 0x04 */ trg_column_description *trg_tree_view_reg_column(TrgTreeView * tv, diff --git a/src/util.c b/src/util.c index 7dd7707..9614855 100644 --- a/src/util.c +++ b/src/util.c @@ -34,6 +34,7 @@ #include "util.h" #include "dispatch.h" +#include "trg-client.h" void add_file_id_to_array(JsonObject * args, gchar * key, gint index) { diff --git a/src/util.h b/src/util.h index 7898b70..7d85e41 100644 --- a/src/util.h +++ b/src/util.h @@ -27,6 +27,8 @@ #include #include +#include "trg-client.h" + #define trg_strlspeed(a, b) tr_strlspeed(a, b, sizeof(a)) #define trg_strlpercent(a, b) tr_strlpercent(a, b, sizeof(a)) #define trg_strlsize(a, b) tr_strlsize(a, b, sizeof(a)) diff --git a/transmission-remote-gtk.pot b/transmission-remote-gtk.pot index 82cd15a..0b3fca6 100644 --- a/transmission-remote-gtk.pot +++ b/transmission-remote-gtk.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-04-23 18:44+0100\n" +"POT-Creation-Date: 2011-05-11 10:17+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -39,7 +39,7 @@ msgid "Paused" msgstr "" #: src/torrent.c:213 src/trg-remote-prefs-dialog.c:265 -#: src/trg-state-selector.c:441 src/trg-torrent-props-dialog.c:220 +#: src/trg-state-selector.c:441 src/trg-torrent-props-dialog.c:218 msgid "Seeding" msgstr "" @@ -67,7 +67,7 @@ msgstr "" msgid "Low Priority" msgstr "" -#: src/trg-files-tree-view.c:228 src/trg-torrent-add-dialog.c:583 +#: src/trg-files-tree-view.c:228 src/trg-torrent-add-dialog.c:528 msgid "Download" msgstr "" @@ -76,12 +76,12 @@ msgid "Skip" msgstr "" #: src/trg-files-tree-view.c:290 src/trg-general-panel.c:251 -#: src/trg-torrent-tree-view.c:43 src/trg-torrent-add-dialog.c:553 +#: src/trg-torrent-tree-view.c:43 src/trg-torrent-add-dialog.c:498 msgid "Name" msgstr "" #: src/trg-files-tree-view.c:295 src/trg-general-panel.c:254 -#: src/trg-torrent-tree-view.c:49 src/trg-torrent-add-dialog.c:570 +#: src/trg-torrent-tree-view.c:49 src/trg-torrent-add-dialog.c:515 msgid "Size" msgstr "" @@ -94,7 +94,7 @@ msgid "Wanted" msgstr "" #: src/trg-files-tree-view.c:301 src/trg-torrent-tree-view.c:84 -#: src/trg-torrent-add-dialog.c:600 +#: src/trg-torrent-add-dialog.c:545 msgid "Priority" msgstr "" @@ -102,8 +102,8 @@ msgstr "" msgid "N/A" msgstr "" -#: src/trg-general-panel.c:169 src/trg-main-window.c:876 -#: src/trg-main-window.c:1121 src/trg-state-selector.c:443 src/util.c:83 +#: src/trg-general-panel.c:169 src/trg-main-window.c:874 +#: src/trg-main-window.c:1115 src/trg-state-selector.c:443 src/util.c:84 msgid "Error" msgstr "" @@ -111,7 +111,7 @@ msgstr "" msgid "ETA" msgstr "" -#: src/trg-general-panel.c:258 +#: src/trg-general-panel.c:258 src/trg-torrent-tree-view.c:86 msgid "Completed" msgstr "" @@ -151,153 +151,153 @@ msgstr "" msgid "Location" msgstr "" -#: src/trg-main-window.c:327 +#: src/trg-main-window.c:325 msgid "This torrent has completed." msgstr "" -#: src/trg-main-window.c:342 +#: src/trg-main-window.c:340 msgid "This torrent has been added." msgstr "" -#: src/trg-main-window.c:507 +#: src/trg-main-window.c:505 msgid "" "Unable to retrieve connection settings from GConf. Schema not installed?" msgstr "" -#: src/trg-main-window.c:510 +#: src/trg-main-window.c:508 msgid "No hostname set" msgstr "" -#: src/trg-main-window.c:513 +#: src/trg-main-window.c:511 msgid "Unknown error getting settings" msgstr "" -#: src/trg-main-window.c:531 +#: src/trg-main-window.c:529 msgid "Connecting..." msgstr "" -#: src/trg-main-window.c:702 +#: src/trg-main-window.c:700 #, c-format msgid "Remove torrent \"%s\"?" msgstr "" -#: src/trg-main-window.c:703 +#: src/trg-main-window.c:701 #, c-format msgid "Remove %d torrents?" msgstr "" -#: src/trg-main-window.c:727 +#: src/trg-main-window.c:725 #, c-format msgid "Remove and delete torrent \"%s\"?" msgstr "" -#: src/trg-main-window.c:728 +#: src/trg-main-window.c:726 #, c-format msgid "Remove and delete %d torrents?" msgstr "" -#: src/trg-main-window.c:797 src/trg-remote-prefs-dialog.c:620 +#: src/trg-main-window.c:795 src/trg-remote-prefs-dialog.c:620 msgid "General" msgstr "" -#: src/trg-main-window.c:805 +#: src/trg-main-window.c:803 msgid "Trackers" msgstr "" -#: src/trg-main-window.c:813 +#: src/trg-main-window.c:811 msgid "Files" msgstr "" -#: src/trg-main-window.c:820 src/trg-remote-prefs-dialog.c:285 -#: src/trg-torrent-props-dialog.c:243 +#: src/trg-main-window.c:818 src/trg-remote-prefs-dialog.c:285 +#: src/trg-torrent-props-dialog.c:241 msgid "Peers" msgstr "" -#: src/trg-main-window.c:869 +#: src/trg-main-window.c:867 #, c-format msgid "This application supports Transmission %.2f and later, you have %.2f." msgstr "" -#: src/trg-main-window.c:931 +#: src/trg-main-window.c:930 #, c-format msgid "Request %d/%d failed: %s" msgstr "" -#: src/trg-main-window.c:1494 +#: src/trg-main-window.c:1488 msgid "No Limit" msgstr "" -#: src/trg-main-window.c:1538 src/trg-menu-bar.c:302 src/trg-toolbar.c:238 +#: src/trg-main-window.c:1532 src/trg-menu-bar.c:302 src/trg-toolbar.c:238 msgid "Properties" msgstr "" -#: src/trg-main-window.c:1541 src/trg-toolbar.c:231 +#: src/trg-main-window.c:1535 src/trg-toolbar.c:231 msgid "Resume" msgstr "" -#: src/trg-main-window.c:1544 src/trg-toolbar.c:234 +#: src/trg-main-window.c:1538 src/trg-toolbar.c:234 msgid "Pause" msgstr "" -#: src/trg-main-window.c:1547 +#: src/trg-main-window.c:1541 msgid "Verify" msgstr "" -#: src/trg-main-window.c:1550 +#: src/trg-main-window.c:1544 msgid "Re-announce" msgstr "" -#: src/trg-main-window.c:1553 src/trg-torrent-move-dialog.c:101 -#: src/trg-torrent-move-dialog.c:108 +#: src/trg-main-window.c:1547 src/trg-torrent-move-dialog.c:116 +#: src/trg-torrent-move-dialog.c:123 msgid "Move" msgstr "" -#: src/trg-main-window.c:1556 src/trg-menu-bar.c:320 src/trg-toolbar.c:242 +#: src/trg-main-window.c:1550 src/trg-menu-bar.c:320 src/trg-toolbar.c:242 msgid "Remove" msgstr "" -#: src/trg-main-window.c:1559 +#: src/trg-main-window.c:1553 msgid "Remove & Delete" msgstr "" -#: src/trg-main-window.c:1565 src/trg-main-window.c:1610 +#: src/trg-main-window.c:1559 src/trg-main-window.c:1604 msgid "Down Limit" msgstr "" -#: src/trg-main-window.c:1570 src/trg-main-window.c:1615 +#: src/trg-main-window.c:1564 src/trg-main-window.c:1609 msgid "Up Limit" msgstr "" -#: src/trg-main-window.c:1592 src/trg-toolbar.c:215 +#: src/trg-main-window.c:1586 src/trg-toolbar.c:215 msgid "Connect" msgstr "" -#: src/trg-main-window.c:1596 src/trg-toolbar.c:218 +#: src/trg-main-window.c:1590 src/trg-toolbar.c:218 msgid "Disconnect" msgstr "" -#: src/trg-main-window.c:1600 src/trg-toolbar.c:221 -#: src/trg-trackers-tree-view.c:253 src/trg-trackers-tree-view.c:280 +#: src/trg-main-window.c:1594 src/trg-toolbar.c:221 +#: src/trg-trackers-tree-view.c:257 src/trg-trackers-tree-view.c:284 msgid "Add" msgstr "" -#: src/trg-main-window.c:1604 +#: src/trg-main-window.c:1598 msgid "Add from URL" msgstr "" -#: src/trg-main-window.c:1619 +#: src/trg-main-window.c:1613 msgid "Resume All" msgstr "" -#: src/trg-main-window.c:1623 +#: src/trg-main-window.c:1617 msgid "Pause All" msgstr "" -#: src/trg-main-window.c:1630 +#: src/trg-main-window.c:1624 msgid "Quit" msgstr "" -#: src/trg-main-window.c:1744 +#: src/trg-main-window.c:1738 msgid "Graph" msgstr "" @@ -529,7 +529,7 @@ msgstr "" msgid "Behavior" msgstr "" -#: src/trg-remote-prefs-dialog.c:226 src/trg-torrent-props-dialog.c:176 +#: src/trg-remote-prefs-dialog.c:226 src/trg-torrent-props-dialog.c:174 msgid "Bandwidth" msgstr "" @@ -666,7 +666,7 @@ msgstr "" msgid "Connections" msgstr "" -#: src/trg-remote-prefs-dialog.c:630 src/trg-torrent-props-dialog.c:319 +#: src/trg-remote-prefs-dialog.c:630 src/trg-torrent-props-dialog.c:317 msgid "Limits" msgstr "" @@ -761,76 +761,76 @@ msgstr "" msgid "Total Downloading" msgstr "" -#: src/trg-torrent-move-dialog.c:98 +#: src/trg-torrent-move-dialog.c:113 msgid "Location:" msgstr "" -#: src/trg-torrent-move-dialog.c:156 +#: src/trg-torrent-move-dialog.c:155 #, c-format msgid "Move %s" msgstr "" -#: src/trg-torrent-move-dialog.c:158 +#: src/trg-torrent-move-dialog.c:157 #, c-format msgid "Move %d torrents" msgstr "" -#: src/trg-torrent-props-dialog.c:180 +#: src/trg-torrent-props-dialog.c:178 msgid "Honor global limits" msgstr "" -#: src/trg-torrent-props-dialog.c:187 src/trg-cell-renderer-priority.c:73 -#: src/trg-torrent-add-dialog.c:330 src/trg-torrent-add-dialog.c:690 +#: src/trg-torrent-props-dialog.c:185 src/trg-cell-renderer-priority.c:73 +#: src/trg-torrent-add-dialog.c:275 src/trg-torrent-add-dialog.c:636 msgid "Low" msgstr "" -#: src/trg-torrent-props-dialog.c:188 src/trg-cell-renderer-priority.c:77 -#: src/trg-torrent-add-dialog.c:327 src/trg-torrent-add-dialog.c:691 +#: src/trg-torrent-props-dialog.c:186 src/trg-cell-renderer-priority.c:77 +#: src/trg-torrent-add-dialog.c:272 src/trg-torrent-add-dialog.c:637 msgid "Normal" msgstr "" -#: src/trg-torrent-props-dialog.c:189 src/trg-cell-renderer-priority.c:75 -#: src/trg-torrent-add-dialog.c:324 src/trg-torrent-add-dialog.c:692 +#: src/trg-torrent-props-dialog.c:187 src/trg-cell-renderer-priority.c:75 +#: src/trg-torrent-add-dialog.c:269 src/trg-torrent-add-dialog.c:638 msgid "High" msgstr "" -#: src/trg-torrent-props-dialog.c:192 +#: src/trg-torrent-props-dialog.c:190 msgid "Torrent priority:" msgstr "" -#: src/trg-torrent-props-dialog.c:195 +#: src/trg-torrent-props-dialog.c:193 msgid "Limit download speed (Kbps)" msgstr "" -#: src/trg-torrent-props-dialog.c:208 +#: src/trg-torrent-props-dialog.c:206 msgid "Limit upload speed (Kbps)" msgstr "" -#: src/trg-torrent-props-dialog.c:224 +#: src/trg-torrent-props-dialog.c:222 msgid "Use global settings" msgstr "" -#: src/trg-torrent-props-dialog.c:226 +#: src/trg-torrent-props-dialog.c:224 msgid "Stop seeding at ratio" msgstr "" -#: src/trg-torrent-props-dialog.c:228 +#: src/trg-torrent-props-dialog.c:226 msgid "Seed regardless of ratio" msgstr "" -#: src/trg-torrent-props-dialog.c:231 +#: src/trg-torrent-props-dialog.c:229 msgid "Seed ratio mode:" msgstr "" -#: src/trg-torrent-props-dialog.c:239 +#: src/trg-torrent-props-dialog.c:237 msgid "Seed ratio limit:" msgstr "" -#: src/trg-torrent-props-dialog.c:250 +#: src/trg-torrent-props-dialog.c:248 msgid "Peer limit:" msgstr "" -#: src/trg-torrent-props-dialog.c:284 +#: src/trg-torrent-props-dialog.c:282 #, c-format msgid "Multiple (%d) torrent properties" msgstr "" @@ -851,163 +851,159 @@ msgstr "" msgid "ID" msgstr "" -#: src/trg-torrent-tree-view.c:86 -msgid "Done Date" -msgstr "" - -#: src/trg-trackers-tree-view.c:155 +#: src/trg-trackers-tree-view.c:158 msgid "Tier" msgstr "" -#: src/trg-trackers-tree-view.c:160 +#: src/trg-trackers-tree-view.c:164 msgid "Announce URL" msgstr "" -#: src/trg-trackers-tree-view.c:175 +#: src/trg-trackers-tree-view.c:179 msgid "Scrape URL" msgstr "" -#: src/trg-trackers-tree-view.c:274 +#: src/trg-trackers-tree-view.c:278 msgid "Delete" msgstr "" -#: src/util.c:132 +#: src/util.c:133 msgid "JSON decoding error." msgstr "" -#: src/util.c:137 +#: src/util.c:138 msgid "Server responded, but with no result." msgstr "" -#: src/util.c:141 +#: src/util.c:142 #, c-format msgid "Request failed with HTTP code %d" msgstr "" -#: src/util.c:204 +#: src/util.c:205 msgid "None" msgstr "" -#: src/util.c:214 +#: src/util.c:215 #, c-format msgid "%'u byte" msgid_plural "%'u bytes" msgstr[0] "" msgstr[1] "" -#: src/util.c:220 +#: src/util.c:221 #, c-format msgid "%'.1f KB" msgstr "" -#: src/util.c:223 +#: src/util.c:224 #, c-format msgid "%'.1f MB" msgstr "" -#: src/util.c:226 +#: src/util.c:227 #, c-format msgid "%'.1f GB" msgstr "" -#: src/util.c:238 +#: src/util.c:239 #, c-format msgid "%.1f KB/s" msgstr "" -#: src/util.c:240 +#: src/util.c:241 #, c-format msgid "%.2f MB/s" msgstr "" -#: src/util.c:242 +#: src/util.c:243 #, c-format msgid "%.1f MB/s" msgstr "" -#: src/util.c:244 +#: src/util.c:245 #, c-format msgid "%.2f GB/s" msgstr "" -#: src/util.c:278 +#: src/util.c:279 #, c-format msgid "%d day" msgid_plural "%d days" msgstr[0] "" msgstr[1] "" -#: src/util.c:279 +#: src/util.c:280 #, c-format msgid "%d hour" msgid_plural "%d hours" msgstr[0] "" msgstr[1] "" -#: src/util.c:281 +#: src/util.c:282 #, c-format msgid "%d minute" msgid_plural "%d minutes" msgstr[0] "" msgstr[1] "" -#: src/util.c:284 +#: src/util.c:285 #, c-format msgid "%ld second" msgid_plural "%ld seconds" msgstr[0] "" msgstr[1] "" -#: src/trg-torrent-add-dialog.c:333 +#: src/trg-torrent-add-dialog.c:278 msgid "Mixed" msgstr "" -#: src/trg-torrent-add-dialog.c:700 +#: src/trg-torrent-add-dialog.c:646 msgid "Torrent files" msgstr "" -#: src/trg-torrent-add-dialog.c:705 +#: src/trg-torrent-add-dialog.c:651 msgid "All files" msgstr "" -#: src/trg-torrent-add-dialog.c:741 +#: src/trg-torrent-add-dialog.c:687 msgid "" "Unable to parse torrent file. File preferences unavailable, but you can " "still try uploading it." msgstr "" -#: src/trg-torrent-add-dialog.c:780 +#: src/trg-torrent-add-dialog.c:726 msgid "(None)" msgstr "" -#: src/trg-torrent-add-dialog.c:782 +#: src/trg-torrent-add-dialog.c:728 msgid "(Multiple)" msgstr "" -#: src/trg-torrent-add-dialog.c:804 +#: src/trg-torrent-add-dialog.c:750 msgid "Add a Torrent" msgstr "" -#: src/trg-torrent-add-dialog.c:867 +#: src/trg-torrent-add-dialog.c:813 msgid "Add Torrent" msgstr "" -#: src/trg-torrent-add-dialog.c:891 +#: src/trg-torrent-add-dialog.c:837 msgid "Start _paused" msgstr "" -#: src/trg-torrent-add-dialog.c:899 +#: src/trg-torrent-add-dialog.c:845 msgid "_Torrent file:" msgstr "" -#: src/trg-torrent-add-dialog.c:919 +#: src/trg-torrent-add-dialog.c:865 msgid "_Destination folder:" msgstr "" -#: src/trg-torrent-add-dialog.c:938 +#: src/trg-torrent-add-dialog.c:885 msgid "Torrent _priority:" msgstr "" -#: src/trg-torrent-add-dialog.c:1038 +#: src/trg-torrent-add-dialog.c:985 msgid "Show _options dialog" msgstr "" -- cgit v1.2.3