Skip to content

Commit

Permalink
fix std:: scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Esser committed Jun 15, 2012
1 parent 15818ca commit 36cf505
Show file tree
Hide file tree
Showing 21 changed files with 195 additions and 195 deletions.
10 changes: 5 additions & 5 deletions src/YGBarGraph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class YGPartitionSplitter : public YPartitionSplitter, public YGWidget
GtkWidget *m_scale, *m_free_spin, *m_new_spin;

YGPartitionSplitter (YWidget *parent, int usedSize, int totalFreeSize, int newPartSize,
int minNewPartSize, int minFreeSize, const string &usedLabel, const string &freeLabel,
const string &newPartLabel, const string &freeFieldLabel, const string &newPartFieldLabel)
int minNewPartSize, int minFreeSize, const std::string &usedLabel, const std::string &freeLabel,
const std::string &newPartLabel, const std::string &freeFieldLabel, const std::string &newPartFieldLabel)
: YPartitionSplitter (NULL, usedSize, totalFreeSize, newPartSize, minNewPartSize,
minFreeSize, usedLabel, freeLabel, newPartLabel, freeFieldLabel, newPartFieldLabel)
, YGWidget (this, parent, GTK_TYPE_VBOX, NULL)
Expand Down Expand Up @@ -161,9 +161,9 @@ class YGPartitionSplitter : public YPartitionSplitter, public YGWidget

YPartitionSplitter *YGOptionalWidgetFactory::createPartitionSplitter (YWidget *parent,
int usedSize, int totalFreeSize, int newPartSize, int minNewPartSize,
int minFreeSize, const string &usedLabel, const string &freeLabel,
const string &newPartLabel, const string &freeFieldLabel,
const string &newPartFieldLabel)
int minFreeSize, const std::string &usedLabel, const std::string &freeLabel,
const std::string &newPartLabel, const std::string &freeFieldLabel,
const std::string &newPartFieldLabel)
{
return new YGPartitionSplitter (parent, usedSize, totalFreeSize, newPartSize,
minNewPartSize, minFreeSize, usedLabel, freeLabel, newPartLabel, freeFieldLabel,
Expand Down
6 changes: 3 additions & 3 deletions src/YGComboBox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class YGComboBox : public YComboBox, public YGLabeledWidget, public YGSelectionStore
{
public:
YGComboBox (YWidget *parent, const string &label, bool editable)
YGComboBox (YWidget *parent, const std::string &label, bool editable)
: YComboBox (NULL, label, editable),
YGLabeledWidget (this, parent, label, YD_HORIZ,
GTK_TYPE_COMBO_BOX, "has-entry", editable ? TRUE : FALSE, NULL),
Expand Down Expand Up @@ -120,7 +120,7 @@ class YGComboBox : public YComboBox, public YGLabeledWidget, public YGSelectionS
gtk_entry_set_width_chars (getEntry(), length);
}

virtual void setValidChars (const string &validChars)
virtual void setValidChars (const std::string &validChars)
{
YComboBox::setValidChars (validChars);
YGUtils::setFilter (getEntry(), validChars);
Expand All @@ -134,7 +134,7 @@ class YGComboBox : public YComboBox, public YGLabeledWidget, public YGSelectionS
YGSELECTION_WIDGET_IMPL (YComboBox)
};

YComboBox *YGWidgetFactory::createComboBox (YWidget *parent, const string &label, bool editable)
YComboBox *YGWidgetFactory::createComboBox (YWidget *parent, const std::string &label, bool editable)
{
return new YGComboBox (parent, label, editable);
}
Expand Down
2 changes: 1 addition & 1 deletion src/YGDialog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class YGWindow
(void) system ("/usr/bin/xterm &");
return TRUE;
case GDK_KEY_Y:
yuiMilestone() << "Opening dialog spy" << endl;
yuiMilestone() << "Opening dialog spy" << std::endl;
YDialogSpy::showDialogSpy();
YGUI::ui()->normalCursor();
break;
Expand Down
18 changes: 9 additions & 9 deletions src/YGFrame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ extern "C" {
class YGFrame : public YFrame, public YGBaseFrame
{
public:
YGFrame (YWidget *parent, const string &label)
YGFrame (YWidget *parent, const std::string &label)
: YFrame (NULL, label),
YGBaseFrame (this, parent)
{
Expand All @@ -87,31 +87,31 @@ class YGFrame : public YFrame, public YGBaseFrame
}

// YFrame
virtual void setLabel (const string &_str)
virtual void setLabel (const std::string &_str)
{
GtkWidget *label = gtk_frame_get_label_widget (GTK_FRAME (getWidget()));
string str (YGUtils::mapKBAccel (_str));
std::string str (YGUtils::mapKBAccel (_str));
gtk_label_set_text_with_mnemonic (GTK_LABEL (label), str.c_str());
YFrame::setLabel (_str);
}

YGWIDGET_IMPL_CONTAINER (YFrame)

// YGWidget
virtual string getDebugLabel() const
virtual std::string getDebugLabel() const
{ return label(); }
};


YFrame *YGWidgetFactory::createFrame (YWidget *parent, const string &label)
YFrame *YGWidgetFactory::createFrame (YWidget *parent, const std::string &label)
{ return new YGFrame (parent, label); }

#include "YCheckBoxFrame.h"

class YGCheckBoxFrame : public YCheckBoxFrame, public YGBaseFrame
{
public:
YGCheckBoxFrame (YWidget *parent, const string &label, bool checked)
YGCheckBoxFrame (YWidget *parent, const std::string &label, bool checked)
: YCheckBoxFrame (NULL, label, checked),
YGBaseFrame (this, parent)
{
Expand All @@ -127,12 +127,12 @@ class YGCheckBoxFrame : public YCheckBoxFrame, public YGBaseFrame
}

// YCheckBoxFrame
virtual void setLabel (const string &_str)
virtual void setLabel (const std::string &_str)
{
GtkWidget *button = gtk_frame_get_label_widget (GTK_FRAME (getWidget()));
GtkLabel *label = GTK_LABEL (gtk_bin_get_child(GTK_BIN (button)));

string str (YGUtils::mapKBAccel (_str));
std::string str (YGUtils::mapKBAccel (_str));
gtk_label_set_text_with_mnemonic (label, str.c_str());
YCheckBoxFrame::setLabel (_str);
}
Expand Down Expand Up @@ -177,6 +177,6 @@ class YGCheckBoxFrame : public YCheckBoxFrame, public YGBaseFrame
};

YCheckBoxFrame *YGWidgetFactory::createCheckBoxFrame (
YWidget *parent, const string &label, bool checked)
YWidget *parent, const std::string &label, bool checked)
{ return new YGCheckBoxFrame (parent, label, checked); }

4 changes: 2 additions & 2 deletions src/YGImage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static inline bool endsWith (const std::string &str1, const char *str2)
class YGImage : public YImage, public YGWidget
{
public:
YGImage (YWidget *parent, const string &filename, bool animated)
YGImage (YWidget *parent, const std::string &filename, bool animated)
: YImage (NULL, filename, animated),
YGWidget (this, parent, YGTK_TYPE_IMAGE, NULL)
{
Expand Down Expand Up @@ -58,6 +58,6 @@ class YGImage : public YImage, public YGWidget
YGWIDGET_IMPL_COMMON (YImage)
};

YImage *YGWidgetFactory::createImage (YWidget *parent, const string &filename, bool animated)
YImage *YGWidgetFactory::createImage (YWidget *parent, const std::string &filename, bool animated)
{ return new YGImage (parent, filename, animated); }

30 changes: 15 additions & 15 deletions src/YGInputField.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class YGInputField : public YInputField, public YGLabeledWidget
{
public:
YGInputField (YWidget *parent, const string &label, bool passwordMode)
YGInputField (YWidget *parent, const std::string &label, bool passwordMode)
: YInputField (NULL, label, passwordMode),
YGLabeledWidget (this, parent, label, YD_HORIZ,
YGTK_TYPE_FIELD_ENTRY, NULL)
Expand All @@ -31,13 +31,13 @@ class YGInputField : public YInputField, public YGLabeledWidget
}

// YInputField
virtual string value()
virtual std::string value()
{
YGtkFieldEntry *field = YGTK_FIELD_ENTRY (getWidget());
return ygtk_field_entry_get_field_text (field, 0);
}

virtual void setValue (const string &text)
virtual void setValue (const std::string &text)
{
BlockEvents block (this);
YGtkFieldEntry *field = YGTK_FIELD_ENTRY (getWidget());
Expand All @@ -56,7 +56,7 @@ class YGInputField : public YInputField, public YGLabeledWidget
updateProps();
}

virtual void setValidChars (const string &validChars)
virtual void setValidChars (const std::string &validChars)
{
YInputField::setValidChars (validChars);
updateProps();
Expand All @@ -79,7 +79,7 @@ class YGInputField : public YInputField, public YGLabeledWidget
YGLABEL_WIDGET_IMPL (YInputField)
};

YInputField *YGWidgetFactory::createInputField (YWidget *parent, const string &label,
YInputField *YGWidgetFactory::createInputField (YWidget *parent, const std::string &label,
bool passwordMode)
{
return new YGInputField (parent, label, passwordMode);
Expand All @@ -90,7 +90,7 @@ YInputField *YGWidgetFactory::createInputField (YWidget *parent, const string &l
class YGTimeField : public YTimeField, public YGLabeledWidget
{
public:
YGTimeField (YWidget *parent, const string &label)
YGTimeField (YWidget *parent, const std::string &label)
: YTimeField (NULL, label),
YGLabeledWidget (this, parent, label, YD_HORIZ,
YGTK_TYPE_FIELD_ENTRY, NULL)
Expand All @@ -105,7 +105,7 @@ class YGTimeField : public YTimeField, public YGLabeledWidget
}

// YTimeField
virtual void setValue (const string &time)
virtual void setValue (const std::string &time)
{
BlockEvents block (this);
if (time.empty()) return;
Expand All @@ -117,15 +117,15 @@ class YGTimeField : public YTimeField, public YGLabeledWidget
ygtk_field_entry_set_field_text (entry, 1, mins);
}

virtual string value()
virtual std::string value()
{
const gchar *hours, *mins;
YGtkFieldEntry *entry = YGTK_FIELD_ENTRY (getWidget());
hours = ygtk_field_entry_get_field_text (entry, 0);
mins = ygtk_field_entry_get_field_text (entry, 1);

gchar *time = g_strdup_printf ("%02d:%02d:00", atoi (hours), atoi (mins));
string str (time);
std::string str (time);
g_free (time);
return str;
}
Expand All @@ -138,7 +138,7 @@ class YGTimeField : public YTimeField, public YGLabeledWidget
YGLABEL_WIDGET_IMPL (YTimeField)
};

YTimeField *YGOptionalWidgetFactory::createTimeField (YWidget *parent, const string &label)
YTimeField *YGOptionalWidgetFactory::createTimeField (YWidget *parent, const std::string &label)
{ return new YGTimeField (parent, label); }

#include "YDateField.h"
Expand All @@ -149,7 +149,7 @@ class YGDateField : public YDateField, public YGLabeledWidget
GtkWidget *m_calendar, *m_popup_calendar;

public:
YGDateField (YWidget *parent, const string &label)
YGDateField (YWidget *parent, const std::string &label)
: YDateField (NULL, label),
YGLabeledWidget (this, parent, label, YD_HORIZ, YGTK_TYPE_FIELD_ENTRY, NULL)
{
Expand Down Expand Up @@ -181,7 +181,7 @@ GtkWidget *m_calendar, *m_popup_calendar;
{ return YGTK_FIELD_ENTRY (getWidget()); }

// YDateField
virtual void setValue (const string &date)
virtual void setValue (const std::string &date)
{
BlockEvents block (this);
if (date.empty()) return;
Expand All @@ -196,7 +196,7 @@ GtkWidget *m_calendar, *m_popup_calendar;
ygtk_field_entry_set_field_text (getField(), 2, day);
}

virtual string value()
virtual std::string value()
{
const gchar *year, *month, *day;
year = ygtk_field_entry_get_field_text (getField(), 0);
Expand All @@ -205,7 +205,7 @@ GtkWidget *m_calendar, *m_popup_calendar;

gchar *time = g_strdup_printf ("%04d-%02d-%02d", atoi (year),
atoi (month), atoi (day));
string str (time);
std::string str (time);
g_free (time);
return str;
}
Expand Down Expand Up @@ -272,7 +272,7 @@ GtkWidget *m_calendar, *m_popup_calendar;
YGLABEL_WIDGET_IMPL (YDateField)
};

YDateField *YGOptionalWidgetFactory::createDateField (YWidget *parent, const string &label)
YDateField *YGOptionalWidgetFactory::createDateField (YWidget *parent, const std::string &label)
{ return new YGDateField (parent, label); }

#include "YTimezoneSelector.h"
Expand Down
10 changes: 5 additions & 5 deletions src/YGIntField.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class YGSpinBox : public YGLabeledWidget
GtkWidget *m_spiner, *m_slider;

public:
YGSpinBox (YWidget *ywidget, YWidget *parent, const string &label,
YGSpinBox (YWidget *ywidget, YWidget *parent, const std::string &label,
int minValue, int maxValue, int initialValue, bool show_slider)
: YGLabeledWidget (ywidget, parent, label, YD_HORIZ,
GTK_TYPE_HBOX, "spacing", 6, NULL)
Expand Down Expand Up @@ -102,7 +102,7 @@ class YGSpinBox : public YGLabeledWidget
class YGIntField : public YIntField, public YGSpinBox
{
public:
YGIntField (YWidget *parent, const string &label, int minValue, int maxValue,
YGIntField (YWidget *parent, const std::string &label, int minValue, int maxValue,
int initialValue)
: YIntField (NULL, label, minValue, maxValue)
, YGSpinBox (this, parent, label, minValue, maxValue, initialValue, false)
Expand All @@ -112,7 +112,7 @@ class YGIntField : public YIntField, public YGSpinBox
YGSPIN_BOX_IMPL (YIntField)
};

YIntField *YGWidgetFactory::createIntField (YWidget *parent, const string &label,
YIntField *YGWidgetFactory::createIntField (YWidget *parent, const std::string &label,
int minValue, int maxValue, int initialValue)
{ return new YGIntField (parent, label, minValue, maxValue, initialValue); }

Expand All @@ -121,7 +121,7 @@ YIntField *YGWidgetFactory::createIntField (YWidget *parent, const string &label
class YGSlider : public YSlider, public YGSpinBox
{
public:
YGSlider (YWidget *parent, const string &label, int minValue, int maxValue,
YGSlider (YWidget *parent, const std::string &label, int minValue, int maxValue,
int initialValue)
: YSlider (NULL, label, minValue, maxValue)
, YGSpinBox (this, parent, label, minValue, maxValue, initialValue, true)
Expand All @@ -134,7 +134,7 @@ class YGSlider : public YSlider, public YGSpinBox
YGSPIN_BOX_IMPL (YSlider)
};

YSlider *YGOptionalWidgetFactory::createSlider (YWidget *parent, const string &label,
YSlider *YGOptionalWidgetFactory::createSlider (YWidget *parent, const std::string &label,
int minValue, int maxValue, int initialValue)
{ return new YGSlider (parent, label, minValue, maxValue, initialValue); }

8 changes: 4 additions & 4 deletions src/YGMenuButton.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static void doCreateMenu (GtkWidget *parent, YItemIterator begin, YItemIterator
{
for (YItemIterator it = begin; it != end; it++) {
GtkWidget *entry, *image = 0;
string str = YGUtils::mapKBAccel ((*it)->label());
std::string str = YGUtils::mapKBAccel ((*it)->label());

if ((*it)->hasIconName()) {
GdkPixbuf *pixbuf = YGUtils::loadPixbuf ((*it)->iconName());
Expand Down Expand Up @@ -61,15 +61,15 @@ static void doCreateMenu (GtkWidget *parent, YItemIterator begin, YItemIterator
class YGMenuButton : public YMenuButton, public YGWidget
{
public:
YGMenuButton (YWidget *parent, const string &label)
YGMenuButton (YWidget *parent, const std::string &label)
: YMenuButton (NULL, label),
YGWidget (this, parent, YGTK_TYPE_MENU_BUTTON, NULL)
{ setLabel (label); }

// YMenuButton
virtual void setLabel (const std::string &label)
{
string str = YGUtils::mapKBAccel (label.c_str());
std::string str = YGUtils::mapKBAccel (label.c_str());
ygtk_menu_button_set_label (YGTK_MENU_BUTTON (getWidget()), str.c_str());
YMenuButton::setLabel (label);
}
Expand All @@ -85,7 +85,7 @@ class YGMenuButton : public YMenuButton, public YGWidget
YGWIDGET_IMPL_COMMON (YMenuButton)
};

YMenuButton *YGWidgetFactory::createMenuButton (YWidget *parent, const string &label)
YMenuButton *YGWidgetFactory::createMenuButton (YWidget *parent, const std::string &label)
{ return new YGMenuButton (parent, label); }

#if YAST2_VERSION > 2018003
Expand Down
4 changes: 2 additions & 2 deletions src/YGPackageSelectorPluginStub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ YGPackageSelectorPluginIf *impl;
{
if (success())
yuiMilestone() << "Loaded " << PLUGIN_BASE_NAME
<< " plugin successfully from " << pluginLibFullPath() << endl;
<< " plugin successfully from " << pluginLibFullPath() << std::endl;
impl = (YGPackageSelectorPluginIf *) locateSymbol ("PSP");
if (!impl)
yuiError() << "Plugin " << PLUGIN_BASE_NAME
<< " does not provide PSP symbol" << endl;
<< " does not provide PSP symbol" << std::endl;
}

static YGPackageSelectorPluginStub *get()
Expand Down
Loading

0 comments on commit 36cf505

Please sign in to comment.