static void cc_region_panel_init (CcRegionPanel * self) { CcRegionPanelPrivate *priv; GtkWidget *prefs_widget; const char *desktop; GError *error = NULL; priv = self->priv = REGION_PANEL_PRIVATE (self); desktop = g_getenv ("XDG_CURRENT_DESKTOP"); priv->builder = gtk_builder_new (); gtk_builder_add_from_file (priv->builder, CINNAMONCC_UI_DIR "/cinnamon-region-panel.ui", &error); if (error != NULL) { g_warning ("Error loading UI file: %s", error->message); g_error_free (error); return; } prefs_widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "vbox1"); gtk_widget_set_size_request (GTK_WIDGET (prefs_widget), -1, 400); gtk_widget_reparent (prefs_widget, GTK_WIDGET (self)); setup_xkb_tabs (priv->builder); }
static void cc_region_panel_init (CcRegionPanel * self) { CcRegionPanelPrivate *priv; GtkWidget *prefs_widget; const char *desktop; GError *error = NULL; priv = self->priv = REGION_PANEL_PRIVATE (self); desktop = g_getenv ("XDG_CURRENT_DESKTOP"); priv->builder = gtk_builder_new (); gtk_builder_add_from_file (priv->builder, GNOMECC_UI_DIR "/gnome-region-panel.ui", &error); if (error != NULL) { g_warning ("Error loading UI file: %s", error->message); g_error_free (error); return; } if (!g_strcmp0 (desktop, "GNOME")) { prefs_widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "region_notebook"); } else { prefs_widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "vbox1"); } gtk_widget_set_size_request (GTK_WIDGET (prefs_widget), -1, 400); gtk_widget_reparent (prefs_widget, GTK_WIDGET (self)); setup_xkb_tabs (priv->builder); if (!g_strcmp0 (desktop, "GNOME")) { setup_language (priv->builder); setup_formats (priv->builder); setup_system (priv->builder); } }