mirror of
https://github.com/transmission/transmission
synced 2025-02-21 21:57:01 +00:00
Fix or silence gtk warnings (#1380)
* chore: disable deprecation warnings in GTK client Yes, updating the GTK codebase is still a goal. (help welcomed!) But there's a deluge of deprecation warnings that drown out other more important warnings, so turn off deprecation warnings for now. * fixup! chore: disable deprecation warnings in GTK client * fix: gtk_tree_sortable_set_sort_column_id caller. * fix: gtk_window_resize caller.
This commit is contained in:
parent
49400ab443
commit
6da4a4dfad
4 changed files with 10 additions and 3 deletions
|
@ -166,6 +166,11 @@ target_link_libraries(${TR_NAME}-gtk
|
|||
${EVENT2_LIBRARIES}
|
||||
)
|
||||
|
||||
if(NOT MSVC)
|
||||
# https://github.com/transmission/transmission/issues/1381 patches welcome
|
||||
target_compile_options(${TR_NAME}-gtk PRIVATE -Wno-deprecated-declarations)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
tr_append_target_property(${TR_NAME}-gtk LINK_FLAGS "/ENTRY:mainCRTStartup")
|
||||
endif()
|
||||
|
|
|
@ -95,7 +95,7 @@ static GtkActionEntry entries[] =
|
|||
{ "pause-all-torrents", "media-playback-pause", N_("_Pause All"), NULL, N_("Pause all torrents"), G_CALLBACK(action_cb) },
|
||||
{ "start-all-torrents", "media-playback-start", N_("_Start All"), NULL, N_("Start all torrents"), G_CALLBACK(action_cb) },
|
||||
{ "relocate-torrent", NULL, N_("Set _Location…"), NULL, NULL, G_CALLBACK(action_cb) },
|
||||
{ "remove-torrent", "list-remove", N_("Remove torrent"), "Delete", G_CALLBACK(action_cb) },
|
||||
{ "remove-torrent", "list-remove", N_("Remove torrent"), "Delete", NULL, G_CALLBACK(action_cb) },
|
||||
{ "delete-torrent", "edit-delete", N_("_Delete Files and Remove"), "<shift>Delete", NULL, G_CALLBACK(action_cb) },
|
||||
{ "new-torrent", "document-new", N_("_New…"), NULL, N_("Create a torrent"), G_CALLBACK(action_cb) },
|
||||
{ "quit", "application-exit", N_("_Quit"), NULL, NULL, G_CALLBACK(action_cb) },
|
||||
|
|
|
@ -2949,7 +2949,9 @@ GtkWidget* gtr_torrent_details_dialog_new(GtkWindow* parent, TrCore* core)
|
|||
gtk_window_set_role(GTK_WINDOW(d), "tr-info");
|
||||
|
||||
/* return saved window size */
|
||||
gtk_window_resize(d, gtr_pref_int_get(TR_KEY_details_window_width), gtr_pref_int_get(TR_KEY_details_window_height));
|
||||
gtk_window_resize(GTK_WINDOW(d),
|
||||
gtr_pref_int_get(TR_KEY_details_window_width),
|
||||
gtr_pref_int_get(TR_KEY_details_window_height));
|
||||
g_signal_connect(d, "size-allocate", G_CALLBACK(on_details_window_size_allocated), NULL);
|
||||
|
||||
g_signal_connect_swapped(d, "response", G_CALLBACK(gtk_widget_destroy), d);
|
||||
|
|
|
@ -593,7 +593,7 @@ void gtr_file_list_set_torrent(GtkWidget* w, int torrentId)
|
|||
gtk_tree_view_set_model(GTK_TREE_VIEW(data->view), data->model);
|
||||
|
||||
/* set default sort by label */
|
||||
gtk_tree_sortable_set_sort_column_id(data->model, FC_LABEL, GTK_SORT_ASCENDING);
|
||||
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(data->store), FC_LABEL, GTK_SORT_ASCENDING);
|
||||
|
||||
gtk_tree_view_expand_all(GTK_TREE_VIEW(data->view));
|
||||
g_object_unref(data->model);
|
||||
|
|
Loading…
Reference in a new issue