forget canvas for a while (now it looks horrible)
authormishas <mikhail.sobolev@gmail.com>
Sat, 14 Apr 2007 16:34:18 +0000 (16:34 +0000)
committermishas <mikhail.sobolev@gmail.com>
Sat, 14 Apr 2007 16:34:18 +0000 (16:34 +0000)
git-svn-id: file:///svnroot/simple-launcher/trunk@183 3ba93dab-e023-0410-b42a-de7732cf370a

settings-dialog.cc
settings-dialog.h
simple-launcher.cc

index c691019..f0cdfe9 100644 (file)
@@ -60,9 +60,9 @@ inline GtkWidget *createUIPage() {
   return vbox;
 }
 
   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),
   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());
   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();
 void SettingsDialog::updateValues() {
   myTransparent.updateValue();
   myIconSize.updateValue();
-  myCanvasSize.updateValue();
 }
 
 // vim:ts=2:sw=2:et
 }
 
 // vim:ts=2:sw=2:et
index a3b452c..f990e53 100644 (file)
@@ -27,7 +27,7 @@
 
 class SettingsDialog {
 public:
 
 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();
  ~SettingsDialog();
 
   gint run();
@@ -41,7 +41,6 @@ private:
 
   SettingsDialogBooleanEntry myTransparent;
   SettingsDialogIntegerEntry myIconSize;
 
   SettingsDialogBooleanEntry myTransparent;
   SettingsDialogIntegerEntry myIconSize;
-  SettingsDialogIntegerEntry myCanvasSize;
 };
 
 #endif
 };
 
 #endif
index 5fe3aae..03ad7d4 100644 (file)
@@ -83,7 +83,6 @@ private:
   GConfBooleanOption myTransparent;
   // bool myShowInfobanner; // FIXME: to implement
   GConfIntegerOption myIconSize;
   GConfBooleanOption myTransparent;
   // bool myShowInfobanner; // FIXME: to implement
   GConfIntegerOption myIconSize;
-  GConfIntegerOption myCanvasSize;
 
   static char *ourDirs[];
 };
 
   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() : 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) {
 }
 
 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());
       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());
 
       {
         GdkPixbuf *pixbuf = item->getIcon(myIconSize.value());
@@ -296,7 +294,7 @@ void SimpleLauncherApplet::updateWidget() {
 
   g_object_unref(G_OBJECT(group));
 
 
   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);
 
   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 :(
   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:
 
   switch (dialog.run()) {
     case GTK_RESPONSE_OK: