summaryrefslogtreecommitdiffstats
path: root/gtk/src/main.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-02-21 00:23:37 +0000
committerjstebbins <[email protected]>2014-02-21 00:23:37 +0000
commitd206a74fb8500b64310b75be8db08ec9e0a972f5 (patch)
tree15941705a5f17d83f29e2b28fc1d548fe5aab9e3 /gtk/src/main.c
parentcc82c19b2f52a7527615ccbae34154e0085b6708 (diff)
LinGui: fix range update issues and plug memory leaks
Updating the range of GtkScale and GtkSpinButtons causes the current value to update inappropriately under some conditions. So update the range and value concurrently. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6051 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/main.c')
-rw-r--r--gtk/src/main.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/gtk/src/main.c b/gtk/src/main.c
index 5b2a3b43b..9232a1fc6 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -286,6 +286,8 @@ bind_queue_tree_model(signal_user_data_t *ud)
gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
gtk_tree_view_column_set_expand(column, TRUE);
gtk_tree_view_column_set_max_width(column, 550);
+ g_signal_connect(treeview, "size-allocate", queue_list_size_allocate_cb,
+ textcell);
cell = custom_cell_renderer_button_new();
column = gtk_tree_view_column_new_with_attributes(
@@ -300,8 +302,6 @@ bind_queue_tree_model(signal_user_data_t *ud)
g_signal_connect(selection, "changed", queue_list_selection_changed_cb, ud);
g_signal_connect(cell, "clicked", queue_remove_clicked_cb, ud);
- g_signal_connect(treeview, "size-allocate", queue_list_size_allocate_cb,
- textcell);
g_signal_connect(treeview, "drag_data_received", queue_drag_cb, ud);
g_signal_connect(treeview, "drag_motion", queue_drag_motion_cb, ud);
}
@@ -868,8 +868,6 @@ main(int argc, char *argv[])
gtk_rc_parse_string(hud_rcstyle);
#endif
- g_type_class_unref(g_type_class_ref(GTK_TYPE_BUTTON));
- g_object_set(gtk_settings_get_default(), "gtk-button-images", TRUE, NULL);
#if !defined(_WIN32)
notify_init("HandBrake");
#endif
@@ -1273,15 +1271,23 @@ main(int argc, char *argv[])
gtk_main();
gtk_status_icon_set_visible(si, FALSE);
ghb_backend_close();
- if (ud->queue)
- ghb_value_free(ud->queue);
- ghb_value_free(ud->settings);
+
+ ghb_value_free(ud->queue);
+ ghb_value_free(ud->settings_array);
+ ghb_value_free(ud->prefs);
+ ghb_value_free(ud->globals);
+ ghb_value_free(ud->x264_priv);
+
g_io_channel_unref(ud->activity_log);
ghb_settings_close();
ghb_resource_free();
#if !defined(_WIN32)
notify_uninit();
#endif
+
+ g_object_unref(ud->builder);
+
+ g_free(ud->current_dvd_device);
g_free(ud);
return 0;