gnome-desktop r5181 - trunk/libgnome-desktop
- From: federico svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-desktop r5181 - trunk/libgnome-desktop
- Date: Sat, 16 Aug 2008 01:46:13 +0000 (UTC)
Author: federico
Date: Sat Aug 16 01:46:13 2008
New Revision: 5181
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5181&view=rev
Log:
Stubs to create the label windows
Signed-off-by: Federico Mena Quintero <federico novell com>
Modified:
trunk/libgnome-desktop/gnome-rr-labeler.c
Modified: trunk/libgnome-desktop/gnome-rr-labeler.c
==============================================================================
--- trunk/libgnome-desktop/gnome-rr-labeler.c (original)
+++ trunk/libgnome-desktop/gnome-rr-labeler.c Sat Aug 16 01:46:13 2008
@@ -36,6 +36,7 @@
int num_outputs;
GdkColor *palette;
+ GtkWidget **windows;
};
struct _GnomeRRLabelerClass {
@@ -73,6 +74,8 @@
* caller do that instead.
*/
+ gnome_rr_labeler_hide (labeler);
+
G_OBJECT_CLASS (gnome_rr_labeler_parent_class)->finalize (object);
}
@@ -201,11 +204,35 @@
}
}
+static GtkWidget *
+create_label_window (GnomeRRLabeler *labeler, GnomeOutputInfo *output, GdkColor *color)
+{
+ /* FIXME */
+}
+
+static void
+create_label_windows (GnomeRRLabeler *labeler)
+{
+ int i;
+
+ labeler->windows = g_new (GtkWidget *, labeler->num_outputs);
+
+ for (i = 0; i < labeler->num_outputs; i++) {
+ if (labeler->config->outputs[i]->on)
+ labeler->windows[i] = create_label_window (labeler, labeler->config->outputs[i], labeler->palette + i);
+ else
+ labeler->windows[i] = NULL;
+ }
+}
+
static void
setup_from_config (GnomeRRLabeler *labeler)
{
labeler->num_outputs = count_outputs (labeler->config);
+
make_palette (labeler);
+
+ create_label_windows (labeler);
}
GnomeRRLabeler *
@@ -226,9 +253,15 @@
void
gnome_rr_labeler_hide (GnomeRRLabeler *labeler)
{
+ int i;
+
g_return_if_fail (GNOME_IS_RR_LABELER (labeler));
- /* FIXME */
+ for (i = 0; i < labeler->num_outputs; i++)
+ if (labeler->windows[i] != NULL) {
+ gtk_widget_destroy (labeler->windows[i]);
+ labeler->windows[i] = NULL;
+ }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]