diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/trg-main-window.c | 10 | ||||
-rw-r--r-- | src/trg-preferences-dialog.c | 8 | ||||
-rw-r--r-- | src/trg-remote-prefs-dialog.c | 6 | ||||
-rw-r--r-- | src/trg-stats-dialog.c | 4 | ||||
-rw-r--r-- | src/trg-torrent-add-url-dialog.c | 6 | ||||
-rw-r--r-- | src/trg-torrent-move-dialog.c | 2 | ||||
-rw-r--r-- | src/trg-torrent-props-dialog.c | 5 | ||||
-rw-r--r-- | src/trg-tree-view.c | 7 |
9 files changed, 31 insertions, 19 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 63bef54..96e781b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -20,7 +20,7 @@ desktopdir = $(datadir)/applications desktop_DATA = transmission-remote-gtk.desktop bin_PROGRAMS = transmission-remote-gtk -INCLUDES = --pedantic -Wall -I.. -DTRGLICENSE=\""$(trglicense)"\" $(libcurl_CFLAGS) $(jsonglib_CFLAGS) $(gthread_CFLAGS) $(gtk_CFLAGS) $(gio_CFLAGS) $(unique_CFLAGS) $(notify_CFLAGS) $(libproxy_CFLAGS) -std=gnu99 +INCLUDES = --pedantic -Wall -Wno-format -I.. -DTRGLICENSE=\""$(trglicense)"\" $(libcurl_CFLAGS) $(jsonglib_CFLAGS) $(gthread_CFLAGS) $(gtk_CFLAGS) $(gio_CFLAGS) $(unique_CFLAGS) $(notify_CFLAGS) $(libproxy_CFLAGS) -std=gnu99 transmission_remote_gtk_SOURCES = main.c \ requests.c \ diff --git a/src/trg-main-window.c b/src/trg-main-window.c index dbb437f..58d3725 100644 --- a/src/trg-main-window.c +++ b/src/trg-main-window.c @@ -1309,14 +1309,14 @@ static void clear_filter_entry_cb(GtkWidget * w, gpointer data G_GNUC_UNUSED) { static gboolean torrent_tv_key_press_event(GtkWidget * w, GdkEventKey * key, gpointer data) { TrgMainWindowPrivate *priv = TRG_MAIN_WINDOW_GET_PRIVATE(data); - if (key->keyval == GDK_Delete) { + if (key->keyval == GDK_KEY_Delete) { if (key->state & GDK_SHIFT_MASK) delete_cb(w, data); else remove_cb(w, data); - } else if (priv->queuesEnabled && (key->state & GDK_MOD1_MASK) && key->keyval == GDK_Up) { + } else if (priv->queuesEnabled && (key->state & GDK_MOD1_MASK) && key->keyval == GDK_KEY_Up) { up_queue_cb(w, data); - } else if (priv->queuesEnabled && (key->state & GDK_MOD1_MASK) && key->keyval == GDK_Down) { + } else if (priv->queuesEnabled && (key->state & GDK_MOD1_MASK) && key->keyval == GDK_KEY_Down) { down_queue_cb(w, data); } return FALSE; @@ -1731,9 +1731,9 @@ static void on_dropped_file( GtkSelectionData *data, guint info, guint time, gpointer user_data) { TrgMainWindow *win = user_data; - if ((data->length >= 0) && (data->format == 8)) + if ((gtk_selection_data_get_length(data) >= 0) && (gtk_selection_data_get_format(data) == 8)) { - if (context->action == GDK_ACTION_MOVE) { + if (gdk_drag_context_get_actions(context) == GDK_ACTION_MOVE) { g_debug ("GDK_ACTION_MOVE"); gchar **uri_list = gtk_selection_data_get_uris(data); guint num_files = g_strv_length(uri_list); diff --git a/src/trg-preferences-dialog.c b/src/trg-preferences-dialog.c index 3d514ff..075b48c 100644 --- a/src/trg-preferences-dialog.c +++ b/src/trg-preferences-dialog.c @@ -671,13 +671,15 @@ static GObject *trg_preferences_dialog_constructor(GType type, guint n_construct_properties, GObjectConstructParam * construct_params) { GObject *object; TrgPreferencesDialogPrivate *priv; - GtkWidget *notebook; + GtkWidget *notebook, *contentvbox; object = G_OBJECT_CLASS (trg_preferences_dialog_parent_class)->constructor(type, n_construct_properties, construct_params); priv = TRG_PREFERENCES_DIALOG_GET_PRIVATE(object); + contentvbox = gtk_dialog_get_content_area (GTK_DIALOG(object)); + gtk_window_set_transient_for(GTK_WINDOW(object), GTK_WINDOW(priv->win)); gtk_window_set_destroy_with_parent(GTK_WINDOW(object), TRUE); gtk_dialog_add_button(GTK_DIALOG(object), GTK_STOCK_CLOSE, @@ -708,10 +710,10 @@ static GObject *trg_preferences_dialog_constructor(GType type, gtk_container_set_border_width(GTK_CONTAINER(notebook), GUI_PAD); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(object)->vbox), notebook, TRUE, TRUE, + gtk_box_pack_start(GTK_BOX(contentvbox), notebook, TRUE, TRUE, 0); - gtk_widget_show_all(GTK_DIALOG(object)->vbox); + //gtk_widget_show_all(GTK_DIALOG(object)->vbox); return object; } diff --git a/src/trg-remote-prefs-dialog.c b/src/trg-remote-prefs-dialog.c index 7fecd9b..7a5beca 100644 --- a/src/trg-remote-prefs-dialog.c +++ b/src/trg-remote-prefs-dialog.c @@ -382,7 +382,7 @@ static GObject *trg_remote_prefs_dialog_constructor(GType type, GObject *object; TrgRemotePrefsDialogPrivate *priv; JsonObject *session; - GtkWidget *notebook; + GtkWidget *notebook, *contentvbox; object = G_OBJECT_CLASS (trg_remote_prefs_dialog_parent_class)->constructor(type, @@ -390,6 +390,8 @@ static GObject *trg_remote_prefs_dialog_constructor(GType type, priv = TRG_REMOTE_PREFS_DIALOG_GET_PRIVATE(object); session = trg_client_get_session(priv->client); + contentvbox = gtk_dialog_get_content_area(GTK_DIALOG(object)); + gtk_window_set_title(GTK_WINDOW(object), _("Remote Preferences")); gtk_window_set_transient_for(GTK_WINDOW(object), GTK_WINDOW(priv->parent)); gtk_window_set_destroy_with_parent(GTK_WINDOW(object), TRUE); @@ -425,7 +427,7 @@ static GObject *trg_remote_prefs_dialog_constructor(GType type, gtk_container_set_border_width(GTK_CONTAINER(notebook), GUI_PAD); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(object)->vbox), notebook, TRUE, TRUE, + gtk_box_pack_start(GTK_BOX(contentvbox), notebook, TRUE, TRUE, 0); return object; diff --git a/src/trg-stats-dialog.c b/src/trg-stats-dialog.c index 98c8606..a159434 100644 --- a/src/trg-stats-dialog.c +++ b/src/trg-stats-dialog.c @@ -145,9 +145,9 @@ static void update_int_stat(JsonObject * args, GtkTreeRowReference * rr, gchar session_val[32]; gchar cumulat_val[32]; - g_snprintf(session_val, sizeof(session_val), "%ld", + g_snprintf(session_val, sizeof(session_val), "%"G_GINT64_FORMAT, json_object_get_int_member(get_session_arg(args), jsonKey)); - g_snprintf(cumulat_val, sizeof(cumulat_val), "%ld", + g_snprintf(cumulat_val, sizeof(cumulat_val), "%"G_GINT64_FORMAT, json_object_get_int_member(get_cumulat_arg(args), jsonKey)); update_statistic(rr, session_val, cumulat_val); diff --git a/src/trg-torrent-add-url-dialog.c b/src/trg-torrent-add-url-dialog.c index ebf211c..7a4c45f 100644 --- a/src/trg-torrent-add-url-dialog.c +++ b/src/trg-torrent-add-url-dialog.c @@ -75,9 +75,11 @@ static void trg_torrent_add_url_dialog_init(TrgTorrentAddUrlDialog * self) { TrgTorrentAddUrlDialogPrivate *priv = TRG_TORRENT_ADD_URL_DIALOG_GET_PRIVATE(self); - GtkWidget *w, *t; + GtkWidget *w, *t, *contentvbox; gint row = 0; + contentvbox = gtk_dialog_get_content_area (GTK_DIALOG(self)); + t = hig_workarea_create(); w = priv->urlEntry = gtk_entry_new(); @@ -108,7 +110,7 @@ static void trg_torrent_add_url_dialog_init(TrgTorrentAddUrlDialog * self) gtk_container_set_border_width(GTK_CONTAINER(t), GUI_PAD); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(self)->vbox), t, TRUE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(contentvbox), t, TRUE, TRUE, 0); } TrgTorrentAddUrlDialog *trg_torrent_add_url_dialog_new(TrgMainWindow * win, diff --git a/src/trg-torrent-move-dialog.c b/src/trg-torrent-move-dialog.c index d7627b7..c742e98 100644 --- a/src/trg-torrent-move-dialog.c +++ b/src/trg-torrent-move-dialog.c @@ -134,7 +134,7 @@ static GObject *trg_torrent_move_dialog_constructor(GType type, gtk_container_set_border_width(GTK_CONTAINER(t), GUI_PAD); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(object)->vbox), t, TRUE, TRUE, + gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area (GTK_DIALOG(object))), t, TRUE, TRUE, 0); count = diff --git a/src/trg-torrent-props-dialog.c b/src/trg-torrent-props-dialog.c index 2ce81ec..2ac11f5 100644 --- a/src/trg-torrent-props-dialog.c +++ b/src/trg-torrent-props-dialog.c @@ -221,7 +221,7 @@ static GObject *trg_torrent_props_dialog_constructor(GType type, JsonObject *json; GtkTreeSelection *selection; gint rowCount; - GtkWidget *notebook; + GtkWidget *notebook, *contentvbox; object = G_OBJECT_CLASS (trg_torrent_props_dialog_parent_class)->constructor(type, @@ -278,7 +278,8 @@ static GObject *trg_torrent_props_dialog_constructor(GType type, gtk_container_set_border_width(GTK_CONTAINER(notebook), GUI_PAD); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(object)->vbox), notebook, + contentvbox = gtk_dialog_get_content_area(GTK_DIALOG(object)); + gtk_box_pack_start(GTK_BOX(contentvbox), notebook, TRUE, TRUE, 0); return object; diff --git a/src/trg-tree-view.c b/src/trg-tree-view.c index 9fccb57..175f294 100644 --- a/src/trg-tree-view.c +++ b/src/trg-tree-view.c @@ -375,8 +375,13 @@ static void trg_tree_view_add_column_after(TrgTreeView * tv, gtk_tree_view_move_column_after(GTK_TREE_VIEW(tv), column, after_col); - g_signal_connect(column->button, "button-press-event", +#if GTK_CHECK_VERSION( 3,0,0 ) + g_signal_connect(gtk_tree_view_column_get_button(column), "button-press-event", G_CALLBACK(col_onButtonPressed), column); +#else + g_signal_connect(column->button, "button-press-event", + G_CALLBACK(col_onButtonPressed), column); +#endif if (desc->out) *(desc->out) = column; |