Author: rpmcruz
Date: Sun Nov 2 01:15:21 2008
New Revision: 52816
URL: http://svn.opensuse.org/viewcvs/yast?rev=52816&view=rev
Log:
* src/YGProgressBar.cc: got rid of ygtkprogressbar.
Removed:
trunk/gtk/src/ygtkprogressbar.c
trunk/gtk/src/ygtkprogressbar.h
Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/Makefile.am
trunk/gtk/src/YGDialog.cc
trunk/gtk/src/YGDialog.h
trunk/gtk/src/YGProgressBar.cc
Modified: trunk/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=52816&r1=52815&r2=52816&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Sun Nov 2 01:15:21 2008
@@ -1,3 +1,7 @@
+2008-11-02 Ricardo Cruz
+
+ * src/YGProgressBar.cc: got rid of ygtkprogressbar.
+
2008-10-29 Ricardo Cruz
* src/YGPackageSelector.cc (ListView): tooltip for status icon.
Modified: trunk/gtk/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/Makefile.am?rev=52816&r1=52815&r2=52816&view=diff
==============================================================================
--- trunk/gtk/src/Makefile.am (original)
+++ trunk/gtk/src/Makefile.am Sun Nov 2 01:15:21 2008
@@ -66,7 +66,6 @@
ygtktimezonepicker.c \
ygtkhandlebox.c \
ygtklinklabel.c \
- ygtkprogressbar.c \
ygtktooltip.c \
ygtkrichtext.c \
yzyppwrapper.cc \
Modified: trunk/gtk/src/YGDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGDialog.cc?rev=52816&r1=52815&r2=52816&view=diff
==============================================================================
--- trunk/gtk/src/YGDialog.cc (original)
+++ trunk/gtk/src/YGDialog.cc Sun Nov 2 01:15:21 2008
@@ -361,6 +361,11 @@
m_window->setChild (this);
}
+void YGDialog::present()
+{
+ gtk_window_present (GTK_WINDOW (m_window->getWidget()));
+}
+
YGDialog *YGDialog::currentDialog()
{
YDialog *ydialog = YDialog::currentDialog (false);
@@ -527,6 +532,7 @@
g_free (str);
m_stickyTitle = sticky;
}
+ present();
}
void YGDialog::setIcon (const std::string &icon)
Modified: trunk/gtk/src/YGDialog.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGDialog.h?rev=52816&r1=52815&r2=52816&view=diff
==============================================================================
--- trunk/gtk/src/YGDialog.h (original)
+++ trunk/gtk/src/YGDialog.h Sun Nov 2 01:15:21 2008
@@ -34,6 +34,7 @@
virtual void openInternal();
virtual void activate();
+ void present();
virtual YEvent *waitForEventInternal (int timeout_millisec);
virtual YEvent *pollEventInternal();
Modified: trunk/gtk/src/YGProgressBar.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGProgressBar.cc?rev=52816&r1=52815&r2=52816&view=diff
==============================================================================
--- trunk/gtk/src/YGProgressBar.cc (original)
+++ trunk/gtk/src/YGProgressBar.cc Sun Nov 2 01:15:21 2008
@@ -22,8 +22,7 @@
// NOTE: its label widget is positionated at the vertical, because its label
// may change often and so will its size, which will look odd (we may want
// to make the label widget to only grow).
- , YGLabeledWidget (this, parent, label, YD_VERT, true,
- YGTK_TYPE_PROGRESS_BAR, NULL)
+ , YGLabeledWidget (this, parent, label, YD_VERT, true, GTK_TYPE_PROGRESS_BAR, NULL)
{}
// YProgressBar
@@ -31,9 +30,9 @@
{
IMPL
YProgressBar::setValue (value);
- YGtkProgressBar *bar = YGTK_PROGRESS_BAR (getWidget());
+ GtkProgressBar *bar = GTK_PROGRESS_BAR (getWidget());
float fraction = CLAMP ((float) value / maxValue(), 0, 1);
- ygtk_progress_bar_set_fraction (bar, fraction);
+ gtk_progress_bar_set_fraction (bar, fraction);
/*
char *text = g_strdup_printf ("%d %%", (int) (fraction*100));
gtk_progress_bar_set_text (bar, text);
@@ -150,9 +149,7 @@
{
ygtk_ratio_box_set_spacing (YGTK_RATIO_BOX (getWidget()), 2);
for (int s = 0; s < segments(); s++) {
- GtkWidget* bar = ygtk_progress_bar_new();
- if (segments() > 1)
- ygtk_progress_bar_disable_continuous (YGTK_PROGRESS_BAR (bar));
+ GtkWidget *bar = gtk_progress_bar_new();
gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (bar),
horizontal() ? GTK_PROGRESS_LEFT_TO_RIGHT : GTK_PROGRESS_BOTTOM_TO_TOP);
// Progress bars would ask for too much size with weight...
@@ -174,8 +171,8 @@
GList* children = gtk_container_get_children (GTK_CONTAINER (getWidget()));
int s = 0;
for (GList *i = children; i && s < segments(); i = i->next, s++) {
- YGtkProgressBar *bar = YGTK_PROGRESS_BAR (i->data);
- ygtk_progress_bar_set_fraction (bar, getSegmentValue (s));
+ GtkProgressBar *bar = GTK_PROGRESS_BAR (i->data);
+ gtk_progress_bar_set_fraction (bar, getSegmentValue (s));
}
g_list_free (children);
}
@@ -210,8 +207,8 @@
until timeout is reached. The application will ping setAlive(true) calls -- and we
reset the timeout -- as an indication that the program hasn't hang in some operation. */
-#define PULSE_INTERVAL 80
-#define PULSE_STEP 0.040
+#define PULSE_INTERVAL 100
+#define PULSE_STEP 0.050
class YGBusyIndicator : public YBusyIndicator, public YGLabeledWidget
{
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org