// Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <gtk/gtkcheckbutton.h>
+#include <gtk/gtkcombobox.h>
#include "dialog-entry.h"
void SettingsDialogIntegerEntry::updateValue() {
((GConfIntegerOption&)myOption).setValue(hildon_number_editor_get_value(mySpinBox));
}
+
+SettingsDialogChoiceEntry::SettingsDialogChoiceEntry(GConfIntegerOption& option, const std::string& name): SettingsDialogEntry(option, name) {
+ myWidget = gtk_combo_box_new_text();
+}
+
+///
+
+static struct {
+ int value;
+ const char *name;
+} IconSizes[] = {
+ { 26, "Extra Small (26)" },
+ { 32, "Small (32)" },
+ { 48, "Medium (48)" },
+ { 64, "Large (64)" },
+ { -1, NULL }
+};
+
+///
HildonNumberEditor *mySpinBox;
};
+class SettingsDialogChoiceEntry : public SettingsDialogEntry {
+public:
+ SettingsDialogChoiceEntry(GConfIntegerOption& option, const std::string& name);
+
+ virtual const std::string& text(int index) const = 0;
+ virtual int numberOfChoices() const = 0;
+ virtual int initialValue() const = 0;
+
+ void updateValue();
+ GtkWidget *getWidget() const { return myWidget; }
+
+private:
+ GtkWidget *myWidget;
+};
+
+class SettingsDialogIconSizeEntry : public SettingsDialogChoiceEntry {
+ SettingsDialogIconSizeEntry(GConfIntegerOption& option, const std::string& name): SettingsDialogChoiceEntry(option, name) {}
+
+ const std::string& text(int index) const;
+ int numberOfChoices() const;
+ int initialValue() const;
+};
+
#endif
// vim:ts=2:sw=2:et