[SCM] calf/master: Added decoration graphics
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:39:43 UTC 2013
The following commit has been merged in the master branch:
commit 14c8a08cb581a7cde1f18dd043ccec3bf4b2caf8
Author: Markus Schmidt <schmidt at boomshop.net>
Date: Sat Oct 17 02:00:50 2009 +0200
Added decoration graphics
diff --git a/gui/background.png b/gui/background.png
new file mode 100644
index 0000000..4316d60
Binary files /dev/null and b/gui/background.png differ
diff --git a/gui/bottom.png b/gui/bottom.png
new file mode 100644
index 0000000..1a5faf4
Binary files /dev/null and b/gui/bottom.png differ
diff --git a/gui/compressor.png b/gui/compressor.png
new file mode 100644
index 0000000..ec327f6
Binary files /dev/null and b/gui/compressor.png differ
diff --git a/gui/filterclavier.png b/gui/filterclavier.png
new file mode 100644
index 0000000..9bf54eb
Binary files /dev/null and b/gui/filterclavier.png differ
diff --git a/gui/flanger.png b/gui/flanger.png
new file mode 100644
index 0000000..31b43ea
Binary files /dev/null and b/gui/flanger.png differ
diff --git a/gui/fluidsynth.png b/gui/fluidsynth.png
new file mode 100644
index 0000000..e6aea8a
Binary files /dev/null and b/gui/fluidsynth.png differ
diff --git a/gui/grip_left.png b/gui/grip_left.png
new file mode 100644
index 0000000..d4e9547
Binary files /dev/null and b/gui/grip_left.png differ
diff --git a/gui/grip_right.png b/gui/grip_right.png
new file mode 100644
index 0000000..5f066be
Binary files /dev/null and b/gui/grip_right.png differ
diff --git a/gui/knob.png b/gui/knob.png
deleted file mode 100644
index 0c0e86b..0000000
Binary files a/gui/knob.png and /dev/null differ
diff --git a/gui/logo.png b/gui/logo.png
new file mode 100644
index 0000000..1fa5134
Binary files /dev/null and b/gui/logo.png differ
diff --git a/gui/monosynth.png b/gui/monosynth.png
new file mode 100644
index 0000000..e05bf75
Binary files /dev/null and b/gui/monosynth.png differ
diff --git a/gui/multibandcompressor.png b/gui/multibandcompressor.png
new file mode 100644
index 0000000..ce731c2
Binary files /dev/null and b/gui/multibandcompressor.png differ
diff --git a/gui/multichorus.png b/gui/multichorus.png
new file mode 100644
index 0000000..5afcf63
Binary files /dev/null and b/gui/multichorus.png differ
diff --git a/gui/organ.png b/gui/organ.png
new file mode 100644
index 0000000..737fc89
Binary files /dev/null and b/gui/organ.png differ
diff --git a/gui/phaser.png b/gui/phaser.png
new file mode 100644
index 0000000..1828187
Binary files /dev/null and b/gui/phaser.png differ
diff --git a/gui/reverb.png b/gui/reverb.png
new file mode 100644
index 0000000..2ce17c5
Binary files /dev/null and b/gui/reverb.png differ
diff --git a/gui/vintagedelay.png b/gui/vintagedelay.png
new file mode 100644
index 0000000..1fedc03
Binary files /dev/null and b/gui/vintagedelay.png differ
diff --git a/src/custom_ctl.cpp b/src/custom_ctl.cpp
index 9a18af0..8b8d85f 100644
--- a/src/custom_ctl.cpp
+++ b/src/custom_ctl.cpp
@@ -900,10 +900,10 @@ calf_knob_class_init (CalfKnobClass *klass)
widget_class->key_release_event = calf_knob_key_release;
widget_class->scroll_event = calf_knob_scroll;
GError *error = NULL;
- klass->knob_image[0] = gdk_pixbuf_new_from_file(PKGLIBDIR "/knob1.png", &error);
- klass->knob_image[1] = gdk_pixbuf_new_from_file(PKGLIBDIR "/knob2.png", &error);
- klass->knob_image[2] = gdk_pixbuf_new_from_file(PKGLIBDIR "/knob3.png", &error);
- klass->knob_image[3] = gdk_pixbuf_new_from_file(PKGLIBDIR "/knob4.png", &error);
+ klass->knob_image[0] = gdk_pixbuf_new_from_file(PKGLIBDIR "/gui/pixmaps/knob1.png", &error);
+ klass->knob_image[1] = gdk_pixbuf_new_from_file(PKGLIBDIR "/gui/pixmaps/knob2.png", &error);
+ klass->knob_image[2] = gdk_pixbuf_new_from_file(PKGLIBDIR "/gui/pixmaps/knob3.png", &error);
+ klass->knob_image[3] = gdk_pixbuf_new_from_file(PKGLIBDIR "/gui/pixmaps/knob4.png", &error);
g_assert(klass->knob_image != NULL);
}
@@ -1047,8 +1047,8 @@ calf_toggle_class_init (CalfToggleClass *klass)
widget_class->button_press_event = calf_toggle_button_press;
widget_class->key_press_event = calf_toggle_key_press;
GError *error = NULL;
- klass->toggle_image[0] = gdk_pixbuf_new_from_file(PKGLIBDIR "/toggle1.png", &error);
- klass->toggle_image[1] = gdk_pixbuf_new_from_file(PKGLIBDIR "/toggle2.png", &error);
+ klass->toggle_image[0] = gdk_pixbuf_new_from_file(PKGLIBDIR "/gui/pixmaps/toggle1.png", &error);
+ klass->toggle_image[1] = gdk_pixbuf_new_from_file(PKGLIBDIR "/gui/pixmaps/toggle2.png", &error);
g_assert(klass->toggle_image != NULL);
}
diff --git a/src/gui.cpp b/src/gui.cpp
index a6811fb..38237b1 100644
--- a/src/gui.cpp
+++ b/src/gui.cpp
@@ -623,7 +623,29 @@ void plugin_gui_window::create(plugin_ctl_iface *_jh, const char *title, const c
const char *xml = _jh->get_gui_xml();
assert(xml);
container = gui->create_from_xml(_jh, xml);
-
+
+ // decorations
+ GtkWidget *bgImg = gtk_image_new_from_file(PKGLIBDIR "/gui/pixmaps/background.png");
+ GtkWidget *logoImg = gtk_image_new_from_file(PKGLIBDIR "/gui/pixmaps/logo.png");
+ GtkWidget *leftImg = gtk_image_new_from_file(PKGLIBDIR "/gui/pixmaps/grip_left.png");
+ GtkWidget *rightImg = gtk_image_new_from_file(PKGLIBDIR "/gui/pixmaps/grip_right.png");
+ GtkWidget *bottomImg = gtk_image_new_from_file(PKGLIBDIR "/gui/pixmaps/bottom.png");
+ gchar *titlePath = g_build_filename(PKGLIBDIR, "/gui/titles/", effect, ".png", NULL);
+ printf(effect);
+ GtkWidget *titleImg = gtk_image_new_from_file(titlePath);
+
+ GtkWidget *bottomBox = gtk_hbox_new(FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(bottomBox), GTK_WIDGET(logoImg), FALSE, FALSE, 0);
+ gtk_box_pack_end(GTK_BOX(bottomBox), GTK_WIDGET(titleImg), FALSE, FALSE, 0);
+
+ GtkWidget *decoTable = gtk_table_new(3, 2, FALSE);
+ gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(bgImg), 0, 3, 0, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
+ gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(leftImg), 0, 1, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
+ gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(rightImg), 2, 3, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
+ gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(bottomImg), 0, 3, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
+ gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(bottomBox), 0, 3, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
+ gtk_table_attach(GTK_TABLE(decoTable), GTK_WIDGET(container), 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
+
string command_xml = make_gui_command_list(command_actions);
gtk_ui_manager_insert_action_group(ui_mgr, command_actions, 0);
gtk_ui_manager_add_ui_from_string(ui_mgr, command_xml.c_str(), -1, &error);
@@ -631,12 +653,12 @@ void plugin_gui_window::create(plugin_ctl_iface *_jh, const char *title, const c
GtkWidget *sw = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_NONE);
- gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), container);
+ gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), GTK_WIDGET(decoTable));
gtk_box_pack_start(GTK_BOX(vbox), sw, true, true, 0);
gtk_widget_show_all(GTK_WIDGET(sw));
- gtk_widget_size_request(container, &req);
+ gtk_widget_size_request(GTK_WIDGET(decoTable), &req);
int wx = max(req.width + 10, req2.width);
int wy = req.height + req2.height + 10;
// printf("size request %dx%d\n", req.width, req.height);
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list