Author: rpmcruz
Date: Thu Sep 10 17:10:46 2009
New Revision: 58615
URL: http://svn.opensuse.org/viewcvs/yast?rev=58615&view=rev
Log:
* src/YGUI.h/cc & src/YGDialog.cc: ensure to be more generous
to sw_single window from the start.
Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGDialog.cc
trunk/gtk/src/YGUI.cc
trunk/gtk/src/YGUI.h
Modified: trunk/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=58615&r1=58614&r2=58615&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Thu Sep 10 17:10:46 2009
@@ -6,6 +6,9 @@
* src/YGUI.h, src/YGMenuButton.cc & src/YGTable.cc: make
compilable with latest libyui.
+ * src/YGUI.h/cc & src/YGDialog.cc: ensure to be more generous
+ to sw_single window from the start.
+
2009-09-10 Ricardo Cruz
* src/ygtkcellrendererbutton.h/c: a push-button for lists.
Modified: trunk/gtk/src/YGDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGDialog.cc?rev=58615&r1=58614&r2=58615&view=diff
==============================================================================
--- trunk/gtk/src/YGDialog.cc (original)
+++ trunk/gtk/src/YGDialog.cc Thu Sep 10 17:10:46 2009
@@ -91,7 +91,13 @@
}
if (_main_window) {
- gtk_window_set_default_size (window, DEFAULT_WIDTH, DEFAULT_HEIGHT);
+ int width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT;
+ if (YGUI::ui()->defaultWidth())
+ width = YGUI::ui()->defaultWidth();
+ if (YGUI::ui()->defaultHeight())
+ height = YGUI::ui()->defaultHeight();
+
+ gtk_window_set_default_size (window, width, height);
if (YGUI::ui()->setFullscreen())
gtk_window_fullscreen (window);
else if (YUI::app()->displayWidth() <= 800 || YUI::app()->displayHeight() <= 600)
Modified: trunk/gtk/src/YGUI.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGUI.cc?rev=58615&r1=58614&r2=58615&view=diff
==============================================================================
--- trunk/gtk/src/YGUI.cc (original)
+++ trunk/gtk/src/YGUI.cc Thu Sep 10 17:10:46 2009
@@ -40,6 +40,7 @@
IMPL
m_have_wm = true;
m_no_border = m_fullscreen = false;
+ m_default_width = (m_default_height = 0);
YGUI::setTextdomain( TEXTDOMAIN );
@@ -102,12 +103,13 @@
YCommandLine cmdLine;
int argc = cmdLine.argc();
char **argv = cmdLine.argv();
-
for (int i = 1; i < argc; i++) {
const char *argp = argv[i];
- if (!argp) continue;
if (argp[0] != '-') {
- //printf ("Warning: Unknown argument '%s'\n", argp);
+ if (!strcmp (argp, "sw_single") || !strcmp (argp, "online_update")) {
+ m_default_width = 700;
+ m_default_height = 800;
+ }
continue;
}
argp++;
@@ -121,12 +123,11 @@
m_no_border = true;
else if (!strcmp (argp, "help")) {
printf (
- "Command line options for the YaST2 Gtk UI:\n"
- "\n"
+ "Command line options for the YaST2 Gtk UI:\n\n"
"--no-wm assume no window manager is running\n"
"--noborder no window manager border for main dialogs\n"
"--fullscreen use full screen for main dialogs\n"
-// "--geomtry WxH sets a default size of W per H to main dialogs\n"
+// "--geometry WxH sets a default size of W per H to main dialogs\n"
"--nothreads run without additional UI threads\n"
"--help prints this help text\n"
"\n"
@@ -134,10 +135,6 @@
exit (0);
}
else if (pkgSelectorParse (argp)) ;
-/*
- else
- printf ("Warning: Unknown argument '--%s'\n", argp);
-*/
}
gtk_init (&argc, &argv);
Modified: trunk/gtk/src/YGUI.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGUI.h?rev=58615&r1=58614&r2=58615&view=diff
==============================================================================
--- trunk/gtk/src/YGUI.h (original)
+++ trunk/gtk/src/YGUI.h Thu Sep 10 17:10:46 2009
@@ -74,6 +74,7 @@
// window-related arguments
bool m_have_wm, m_no_border, m_fullscreen;
+ int m_default_width, m_default_height;
bool pkgSelectorParse (const char *arg);
@@ -82,6 +83,8 @@
bool setFullscreen() const { return m_fullscreen; }
bool hasWM() const { return m_have_wm; }
bool unsetBorder() const { return m_no_border; }
+ int defaultWidth() const { return m_default_width; }
+ int defaultHeight() const { return m_default_height; }
};
// debug helpers.
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org