Add window save/restore

Dirk Hohndel dirk at hohndel.org
Sun Feb 3 12:16:34 PST 2013


Amit Chaudhuri <amit.k.chaudhuri at gmail.com> writes:

> Hi.
>
> This patch adds window save/restore functionality.  Window position and
> dimensions are stored and recalled using the same gconf_client style of
> calls used elsewhere in subsurface.

I'm not sure I like the idea of four integer parameters - but I guess
there is no consistent way to express (and then easily set/restore)
window geometry across different OSs? 

> For Linux I have made the necessary changes to linux.c, but on windows and
> OSX I provide function stubs to invite others to complete. Anyone?

I am a bit torn whether to include this in its current form... I've seen
Henrik's Mac change, maybe if Lubomir sends the corresponding Windows
change I'll consider it... But for a couple of issues below I'll ask you
to re-create this patch...

> @@ -1249,6 +1283,7 @@ static void edit_dc_nicknames(GtkWidget *w, gpointer data)
>  		GTK_STOCK_APPLY,
>  		GTK_RESPONSE_APPLY,
>  		NULL);
> +
>  	gtk_widget_set_size_request(dialog, 700, 400);
>  
>  	scroll = gtk_scrolled_window_new(NULL, NULL);
> @@ -1628,6 +1664,8 @@ void run_ui(void)
>  	gtk_main();
>  }
>  
> +
> +
>  void exit_ui(void)
>  {
>  	subsurface_close_conf();

Please try not to submit random whitespace changes like this.
Sometimes whitespace changes are intentional to break up hard to read
code, but this clearly isn't one of those times, right?

> diff --git a/satellite.h b/satellite.h
> index 0e9e228..2cf6f15 100644
> --- a/satellite.h
> +++ b/satellite.h
> @@ -2,27 +2,31 @@
>  
>  static const GdkPixdata satellite_pixbuf = {
>    0x47646b50, /* Pixbuf magic: 'GdkP' */
> -  24 + 445, /* header length + pixel_data length */
> +  24 + 576, /* header length + pixel_data length */
>    0x2010002, /* pixdata_type */
>    44, /* rowstride */
>    11, /* width */
>    15, /* height */
>    /* pixel_data: */
> -  "\204\0\0\0\0\6\0\0\0\27\0\0\0\243\0\0\0\240\0\0\0\253\0\0\0\215\0\0\0"
> -  "\22\202\0\0\0\0\2\0\0\0(\0\0\0\23\202\0\0\0\0\11\0\0\0\4\0\0\0.\0\0\0"
> -  ")\0\0\0,\0\0\0\256\0\0\0\14\0\0\0\0\0\0\0""0\0\0\0\241\202\0\0\0\0\12"
> -  "\0\0\0\12\0\0\0u\0\0\0\221\0\0\0n\0\0\0A\0\0\0r\0\0\0\0\0\0\0\"\0\0\0"
> -  "\376\0\0\0<\204\0\0\0\0\10\0\0\0\254\0\0\0\2\0\0\0\245\0\0\0\0\0\0\0"
> -  "\2\0\0\0\357\0\0\0\337\0\0\0\23\203\0\0\0\0\3\0\0\0[\0\0\0\17\0\0\0\232"
> -  "\202\0\0\0\0\4\0\0\0\257\0\0\0\377\0\0\0\321\0\0\0\36\204\0\0\0\0\1\0"
> -  "\0\0\24\202\0\0\0\0\6\0\0\0""7\0\0\0\376\0\0\0\377\0\0\0\362\0\0\0y\0"
> -  "\0\0\23\206\0\0\0\0\2\0\0\0g\0\0\0\374\202\0\0\0\377\4\0\0\0\373\0\0"
> -  "\0\301\0\0\0{\0\0\0,\204\0\0\0\0\12\0\0\0\35\0\0\0o\0\0\0\206\0\0\0\200"
> -  "\0\0\0d\0\0\0""3\0\0\0\4\0\0\0\0\0\0\0-\0\0\0\7\211\0\0\0\0\3\0\0\0\243"
> -  "\0\0\0\307\0\0\0P\207\0\0\0\0\5\0\0\0\5\0\0\0\360\0\0\0\377\0\0\0\372"
> -  "\0\0\0\33\206\0\0\0\0\1\0\0\0@\203\0\0\0\377\1\0\0\0\201\206\0\0\0\0"
> -  "\1\0\0\0\215\203\0\0\0\377\2\0\0\0\352\0\0\0\10\205\0\0\0\0\1\0\0\0\331"
> -  "\204\0\0\0\377\1\0\0\0_\205\0\0\0\0",
> +  "R\226\226\226\0\223\223\223\2\226\226\226\1...\0""5551\36\36\36\253\33"
> +  "\33\33\243\34\34\34\251\35\35\35\243+++5\0\0\0\0""555\0""999,@@@%111"
> +  "\0///\17""444*,,,O***O'''Q\35\35\35\241///,\26\26\26\0\40\40\40N\33\33"
> +  "\33\222jjj\5>>>\0AAA\40\"\"\"u\33\33\33\221&&&r$$$]\35\35\35\214\31\31"
> +  "\31\0\36\36\36=\12\12\12\347###T\0\0\0\0\377\377\377\0\7\7\7\0---\26"
> +  "\33\33\33\235+++=\34\34\34\251...\0///#\10\10\10\345\13\13\13\330..."
> +  "0\31\31\31\0OOO\0""999\12(((d,,,=\36\36\36\237RRR\0bbb\10\17\17\17\265"
> +  "\1\1\1\377\14\14\14\312+++:\374\374\374\1\0\0\0\0\377\377\377\0===\23"
> +  "333+\254\254\254\0\0\0\0\0\"\"\"Y\5\5\5\366\0\0\0\377\10\10\10\344\25"
> +  "\25\25\201)))+___\6\0\0\0\0\367\367\367\0\0\0\0\0GGG\0\\\\\\\10\33\33"
> +  "\33\201\6\6\6\357\202\1\1\1\377\4\7\7\7\352\20\20\20\265\40\40\40rFF"
> +  "F0\202\0\0\0\0\16GGG\0WWW\5$$$<\26\26\26}\11\11\11\223\14\14\14\222\24"
> +  "\24\24}\37\37\37SHHH#\1\1\1\0""7779999!\31\31\31\0\353\353\353\0\206"
> +  "\0\0\0\0\6\211\211\211\5\22\22\22\250\16\16\16\311\40\40\40_XXX\6SSS"
> +  "\0\205\0\0\0\0\6""444%\11\11\11\334\0\0\0\377\7\7\7\354***7\36\36\36"
> +  "\0\205\0\0\0\0\7\37\37\37`\3\3\3\370\0\0\0\377\1\1\1\377\25\25\25\215"
> +  "\377\377\377\0jjj\0\204\0\0\0\0\2\23\23\23\252\1\1\1\377\202\0\0\0\377"
> +  "\3\11\11\11\334555$...\0\204\0\0\0\0\1\13\13\13\347\203\0\0\0\377\4\3"
> +  "\3\3\376\35\35\35i\0\0\0\0\331\331\331\0\203\0\0\0\0",
>  };
>  
>  
> diff --git a/satellite.png b/satellite.png
> index f019538..123a8d5 100644
> Binary files a/satellite.png and b/satellite.png differ

Umm - why are there changes to the satellite image in the middle of this?


/D


More information about the subsurface mailing list