summaryrefslogtreecommitdiffstats
path: root/gtk/src/main.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-04-19 00:18:17 +0000
committerjstebbins <[email protected]>2011-04-19 00:18:17 +0000
commit9c94517108b677e2f1d71e1bd332ee70210720f6 (patch)
treeb95aaefb15a1e0884519926c0c457e8839e49848 /gtk/src/main.c
parentd0d06731c765a1a4c43558639405533d2af088b7 (diff)
LinGui: remember user window size changes
window size gets stored in prefs when changed and restored whenever ghb starts. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3939 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/main.c')
-rw-r--r--gtk/src/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/src/main.c b/gtk/src/main.c
index 11aae0697..2534dc449 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -948,7 +948,7 @@ main (int argc, char *argv[])
// Ugly hack to keep subtitle table from bouncing around as I change
// which set of controls are visible
GtkRequisition req;
- gint height;
+ gint width, height;
widget = GHB_WIDGET(ud->builder, "SrtCodeset");
gtk_widget_size_request( widget, &req );
@@ -962,11 +962,15 @@ main (int argc, char *argv[])
widget = GHB_WIDGET (ud->builder, "hb_window");
GdkGeometry geo = {
- -1, -1, 1024, 768, 200, 200, 10, 10, 0, 0, GDK_GRAVITY_NORTH_WEST
+ -1, -1, 1024, 768, -1, -1, 10, 10, 0, 0, GDK_GRAVITY_NORTH_WEST
};
GdkWindowHints geo_mask;
geo_mask = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE | GDK_HINT_BASE_SIZE;
gtk_window_set_geometry_hints( GTK_WINDOW(widget), widget, &geo, geo_mask);
+ width = ghb_settings_get_int(ud->settings, "window_width");
+ height = ghb_settings_get_int(ud->settings, "window_height");
+ gtk_window_resize(GTK_WINDOW(widget), width, height);
+ gtk_widget_show(widget);
// Everything should be go-to-go. Lets rock!