From: mishas Date: Sat, 14 Apr 2007 16:34:18 +0000 (+0000) Subject: forget canvas for a while (now it looks horrible) X-Git-Url: http://git.maemo.org/git/?p=simple-launcher;a=commitdiff_plain;h=586b97dc5d6f169428a74615ee6ef7d6fa1525b1 forget canvas for a while (now it looks horrible) git-svn-id: file:///svnroot/simple-launcher/trunk@183 3ba93dab-e023-0410-b42a-de7732cf370a --- diff --git a/settings-dialog.cc b/settings-dialog.cc index c691019..f0cdfe9 100644 --- a/settings-dialog.cc +++ b/settings-dialog.cc @@ -60,9 +60,9 @@ inline GtkWidget *createUIPage() { return vbox; } -SettingsDialog::SettingsDialog(GtkWindow *parent, LauncherItems& items, GConfBooleanOption& transparent, GConfIntegerOption& icon_size, GConfIntegerOption& canvas_size): +SettingsDialog::SettingsDialog(GtkWindow *parent, LauncherItems& items, GConfBooleanOption& transparent, GConfIntegerOption& icon_size): myList(SL_APPLET_SETTINGS_ICON_SIZE, items), - myTransparent(transparent, "Transparent background:"), myIconSize(icon_size, "Icon Size:"), myCanvasSize(canvas_size, "Canvas Size:") { + myTransparent(transparent, "Transparent background:"), myIconSize(icon_size, "Icon Size:") { myDialog = GTK_DIALOG(gtk_dialog_new_with_buttons("Launcher Settings", parent, (GtkDialogFlags)(GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT), "OK", GTK_RESPONSE_OK, "Cancel", GTK_RESPONSE_CANCEL, NULL)); GtkNotebook *notebook = GTK_NOTEBOOK(gtk_notebook_new()); @@ -91,7 +91,6 @@ gint SettingsDialog::run() { void SettingsDialog::updateValues() { myTransparent.updateValue(); myIconSize.updateValue(); - myCanvasSize.updateValue(); } // vim:ts=2:sw=2:et diff --git a/settings-dialog.h b/settings-dialog.h index a3b452c..f990e53 100644 --- a/settings-dialog.h +++ b/settings-dialog.h @@ -27,7 +27,7 @@ class SettingsDialog { public: - SettingsDialog(GtkWindow *parent, LauncherItems& items, GConfBooleanOption& transparent, GConfIntegerOption& icon_size, GConfIntegerOption& canvas_size); + SettingsDialog(GtkWindow *parent, LauncherItems& items, GConfBooleanOption& transparent, GConfIntegerOption& icon_size); ~SettingsDialog(); gint run(); @@ -41,7 +41,6 @@ private: SettingsDialogBooleanEntry myTransparent; SettingsDialogIntegerEntry myIconSize; - SettingsDialogIntegerEntry myCanvasSize; }; #endif diff --git a/simple-launcher.cc b/simple-launcher.cc index 5fe3aae..03ad7d4 100644 --- a/simple-launcher.cc +++ b/simple-launcher.cc @@ -83,7 +83,6 @@ private: GConfBooleanOption myTransparent; // bool myShowInfobanner; // FIXME: to implement GConfIntegerOption myIconSize; - GConfIntegerOption myCanvasSize; static char *ourDirs[]; }; @@ -137,7 +136,7 @@ char *SimpleLauncherApplet::ourDirs[] = { }; // SimpleLauncherApplet::SimpleLauncherApplet() : myMainSettings(myClient.getKey(SL_APPLET_GCONF_PATH)), myContext(NULL), myWidget(NULL), myParent(NULL) { -SimpleLauncherApplet::SimpleLauncherApplet(const GConfKey& base) : myContext(NULL), myWidget(NULL), myParent(NULL), myTransparent(base, "transparent", true), myIconSize(base, "icon_size", 48), myCanvasSize(base, "canvas_size", 1) { +SimpleLauncherApplet::SimpleLauncherApplet(const GConfKey& base) : myContext(NULL), myWidget(NULL), myParent(NULL), myTransparent(base, "transparent", true), myIconSize(base, "icon_size", 48) { } bool SimpleLauncherApplet::doInit(void *state_data, int *state_size) { @@ -276,7 +275,6 @@ void SimpleLauncherApplet::updateWidget() { g_signal_connect(button, "button-press-event", G_CALLBACK(_button_pressed), this); gtk_event_box_set_visible_window(GTK_EVENT_BOX(button), !myTransparent.value()); - gtk_container_set_border_width(GTK_CONTAINER(button), myCanvasSize.value()); { GdkPixbuf *pixbuf = item->getIcon(myIconSize.value()); @@ -296,7 +294,7 @@ void SimpleLauncherApplet::updateWidget() { g_object_unref(G_OBJECT(group)); - int totalSize = myIconSize.value()+2*myCanvasSize.value(); + int totalSize = myIconSize.value(); if (button_no == 0) { gtk_widget_set_size_request(myWidget, totalSize, totalSize); @@ -355,7 +353,7 @@ void SimpleLauncherApplet::runDialog() { LauncherItems newItems = myItems; // TODO: make it nicer... this code is ugly :( - SettingsDialog dialog(myParent, newItems, myTransparent, myIconSize, myCanvasSize); + SettingsDialog dialog(myParent, newItems, myTransparent, myIconSize); switch (dialog.run()) { case GTK_RESPONSE_OK: