Mercurial > dwindows
diff gtk/dw.c @ 15:81833f25b1aa
Added new Dynamic Windows build information to the DWEnv struct.
It reports version numbers and build time/date.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 12 Jul 2001 20:31:26 +0000 |
parents | 176cee043f1b |
children | f26eced21a30 |
line wrap: on
line diff
--- a/gtk/dw.c Wed Jul 11 21:57:56 2001 +0000 +++ b/gtk/dw.c Thu Jul 12 20:31:26 2001 +0000 @@ -3389,23 +3389,13 @@ DW_MUTEX_LOCK; if(handle && GTK_IS_WINDOW(handle)) { - GdkWindow *parent = gdk_window_get_parent(handle->window); int cx = (int)gtk_object_get_data(GTK_OBJECT(handle), "cx"); int cy = (int)gtk_object_get_data(GTK_OBJECT(handle), "cy"); _size_allocate(GTK_WINDOW(handle)); -#if 0 - if(parent) - { - gdk_window_resize(parent, width, height); - gdk_window_move(parent, x, y); - } - else -#endif - { - gtk_widget_set_uposition(handle, x, y); - gtk_window_set_default_size(GTK_WINDOW(handle), width - cx, height - cy); - } + + gtk_widget_set_uposition(handle, x, y); + gtk_window_set_default_size(GTK_WINDOW(handle), width - cx, height - cy); } else if(handle && handle->window) { @@ -3495,11 +3485,13 @@ DW_MUTEX_LOCK; for(z=0;z<256;z++) + { if(!gtk_notebook_get_nth_page(GTK_NOTEBOOK(handle), z)) { DW_MUTEX_UNLOCK; return z; } + } DW_MUTEX_UNLOCK; @@ -3594,13 +3586,24 @@ */ void dw_notebook_pack(HWND handle, unsigned long pageid, HWND page) { - GtkWidget *label; + GtkWidget *label, *child, *oldlabel; + gchar *text = NULL; int _locked_by_me = FALSE; DW_MUTEX_LOCK; - label = gtk_label_new(""); - - gtk_notebook_append_page (GTK_NOTEBOOK(handle), page, label); + child = gtk_notebook_get_nth_page(GTK_NOTEBOOK(handle), pageid); + if(child) + { + oldlabel = gtk_notebook_get_tab_label(GTK_NOTEBOOK(handle), child); + if(oldlabel) + gtk_label_get(GTK_LABEL(oldlabel), &text); + } + + label = gtk_label_new(text ? text : ""); + + gtk_notebook_insert_page(GTK_NOTEBOOK(handle), page, label, pageid); + if(child) + gtk_notebook_remove_page(GTK_NOTEBOOK(handle), pageid+1); DW_MUTEX_UNLOCK; } @@ -4105,6 +4108,12 @@ len = strlen(tempbuf); + strcpy(env->buildDate, __DATE__); + strcpy(env->buildTime, __TIME__); + env->DWMajorVersion = DW_MAJOR_VERSION; + env->DWMinorVersion = DW_MINOR_VERSION; + env->DWSubVersion = DW_SUB_VERSION; + for(z=1;z<len;z++) { if(tempbuf[z] == '.')