gedit r6688 - in branches/win32: . gedit gedit/dialogs



Author: icq
Date: Mon Dec 22 22:02:09 2008
New Revision: 6688
URL: http://svn.gnome.org/viewvc/gedit?rev=6688&view=rev

Log:
2008-12-22  Ignacio Casal Quinteiro  <nacho resa gmail com>

        * gedit/dialogs/gedit-open-location-dialog.c:
        * gedit/dialogs/gedit-encodings-dialog.c:
        * gedit/dialogs/gedit-preferences-dialog.c:
        * gedit/dialogs/gedit-style-scheme-dialog.c:
        * gedit/dialogs/gedit-search-dialog.c:
        * gedit/gedit-print-job.c:
        * gedit/gedit-window.c:
        * gedit/gedit-style-scheme-manager.c:
        Use the dir functions.



Modified:
   branches/win32/ChangeLog
   branches/win32/gedit/dialogs/gedit-encodings-dialog.c
   branches/win32/gedit/dialogs/gedit-open-location-dialog.c
   branches/win32/gedit/dialogs/gedit-preferences-dialog.c
   branches/win32/gedit/dialogs/gedit-search-dialog.c
   branches/win32/gedit/dialogs/gedit-style-scheme-dialog.c
   branches/win32/gedit/gedit-print-job.c
   branches/win32/gedit/gedit-style-scheme-manager.c
   branches/win32/gedit/gedit-window.c

Modified: branches/win32/gedit/dialogs/gedit-encodings-dialog.c
==============================================================================
--- branches/win32/gedit/dialogs/gedit-encodings-dialog.c	(original)
+++ branches/win32/gedit/dialogs/gedit-encodings-dialog.c	Mon Dec 22 22:02:09 2008
@@ -44,6 +44,7 @@
 #include "gedit-utils.h"
 #include "gedit-debug.h"
 #include "gedit-help.h"
+#include "gedit-dirs.h"
 
 #define GEDIT_ENCODINGS_DIALOG_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
 						   GEDIT_TYPE_ENCODINGS_DIALOG,           \
@@ -300,6 +301,7 @@
 	GtkWidget *error_widget;
 	int i;
 	gboolean ret;
+	gchar *file;
 	gchar *root_objects[] = {
 		"encodings-dialog-contents",
 		NULL
@@ -334,7 +336,8 @@
 			  G_CALLBACK (response_handler),
 			  dlg);
 
-	ret = gedit_utils_get_ui_objects (GEDIT_UIDIR "gedit-encodings-dialog.ui",
+	file = gedit_dirs_get_ui_file ("gedit-encodings-dialog.ui");
+	ret = gedit_utils_get_ui_objects (file,
 					  root_objects,
 					  &error_widget,
 					  "encodings-dialog-contents", &content,
@@ -343,6 +346,7 @@
 					  "available-treeview", &dlg->priv->available_treeview,
 					  "displayed-treeview", &dlg->priv->displayed_treeview,
 					  NULL);
+	g_free (file);
 
 	if (!ret)
 	{

Modified: branches/win32/gedit/dialogs/gedit-open-location-dialog.c
==============================================================================
--- branches/win32/gedit/dialogs/gedit-open-location-dialog.c	(original)
+++ branches/win32/gedit/dialogs/gedit-open-location-dialog.c	Mon Dec 22 22:02:09 2008
@@ -41,6 +41,7 @@
 #include "gedit-encodings-option-menu.h"
 #include "gedit-utils.h"
 #include "gedit-help.h"
+#include "gedit-dirs.h"
 
 #define GEDIT_OPEN_LOCATION_DIALOG_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), \
 							GEDIT_TYPE_OPEN_LOCATION_DIALOG, \
@@ -117,6 +118,7 @@
 	GtkWidget *encoding_hbox;
 	GtkWidget *error_widget;
 	gboolean   ret;
+	gchar *file;
 	gchar     *root_objects[] = {
 		"open_uri_dialog_content",
 		NULL
@@ -154,7 +156,8 @@
 			  G_CALLBACK (response_handler),
 			  NULL);
 
-	ret = gedit_utils_get_ui_objects (GEDIT_UIDIR "gedit-open-location-dialog.ui",
+	file = gedit_dirs_get_ui_file ("gedit-open-location-dialog.ui");
+	ret = gedit_utils_get_ui_objects (file,
 					  root_objects,
 					  &error_widget,
 					  "open_uri_dialog_content", &content,
@@ -163,6 +166,7 @@
 					  "encoding_label", &encoding_label,
 					  "encoding_hbox", &encoding_hbox,
 					   NULL);
+	g_free (file);
 
 	if (!ret)
 	{

Modified: branches/win32/gedit/dialogs/gedit-preferences-dialog.c
==============================================================================
--- branches/win32/gedit/dialogs/gedit-preferences-dialog.c	(original)
+++ branches/win32/gedit/dialogs/gedit-preferences-dialog.c	Mon Dec 22 22:02:09 2008
@@ -48,6 +48,7 @@
 #include "gedit-style-scheme-manager.h"
 #include "gedit-plugin-manager.h"
 #include "gedit-help.h"
+#include "gedit-dirs.h"
 
 /*
  * gedit-preferences dialog is a singleton since we don't
@@ -1062,6 +1063,7 @@
 {
 	GtkWidget *error_widget;
 	gboolean ret;
+	gchar *file;
 	gchar *root_objects[] = {
 		"notebook",
 		"adjustment1",
@@ -1097,7 +1099,8 @@
 			  G_CALLBACK (dialog_response_handler),
 			  NULL);
 	
-	ret = gedit_utils_get_ui_objects (GEDIT_UIDIR "gedit-preferences-dialog.ui",
+	file = gedit_dirs_get_ui_file ("gedit-preferences-dialog.ui");
+	ret = gedit_utils_get_ui_objects (file,
 		root_objects,
 		&error_widget,
 
@@ -1135,6 +1138,7 @@
 		"plugin_manager_place_holder", &dlg->priv->plugin_manager_place_holder,
 
 		NULL);
+	g_free (file);
 
 	if (!ret)
 	{

Modified: branches/win32/gedit/dialogs/gedit-search-dialog.c
==============================================================================
--- branches/win32/gedit/dialogs/gedit-search-dialog.c	(original)
+++ branches/win32/gedit/dialogs/gedit-search-dialog.c	Mon Dec 22 22:02:09 2008
@@ -40,6 +40,7 @@
 #include "gedit-history-entry.h"
 #include "gedit-utils.h"
 #include "gedit-marshal.h"
+#include "gedit-dirs.h"
 
 #define GEDIT_SEARCH_DIALOG_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
 						GEDIT_TYPE_SEARCH_DIALOG,              \
@@ -321,6 +322,7 @@
 	GtkWidget *content;
 	GtkWidget *error_widget;
 	gboolean ret;
+	gchar *file;
 	gchar *root_objects[] = {
 		"search_dialog_content",
 		NULL
@@ -342,7 +344,8 @@
 	gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 5);
 	gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->action_area), 6);
 
-	ret = gedit_utils_get_ui_objects (GEDIT_UIDIR "gedit-search-dialog.ui",
+	file = gedit_dirs_get_ui_file ("gedit-search-dialog.ui");
+	ret = gedit_utils_get_ui_objects (file,
 					  root_objects,
 					  &error_widget,
 					  "search_dialog_content", &content,
@@ -354,6 +357,7 @@
 					  "search_backwards_checkbutton", &dlg->priv->backwards_checkbutton,
 					  "wrap_around_checkbutton", &dlg->priv->wrap_around_checkbutton,
 					  NULL);
+	g_free (file);
 
 	if (!ret)
 	{

Modified: branches/win32/gedit/dialogs/gedit-style-scheme-dialog.c
==============================================================================
--- branches/win32/gedit/dialogs/gedit-style-scheme-dialog.c	(original)
+++ branches/win32/gedit/dialogs/gedit-style-scheme-dialog.c	Mon Dec 22 22:02:09 2008
@@ -39,6 +39,7 @@
 #include "gedit-utils.h"
 #include "gedit-debug.h"
 #include "gedit-help.h"
+#include "gedit-dirs.h"
 
 #define GEDIT_STYLE_SCHEME_DIALOG_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
 						      GEDIT_TYPE_STYLE_SCHEME_DIALOG, \
@@ -121,6 +122,7 @@
 	GtkWidget *error_widget;
 	GtkWidget *main_vbox;
 	gboolean ret;
+	gchar *file;
 	gchar *root_objects[] = {
 		"contents",
 		NULL
@@ -147,7 +149,8 @@
 			  G_CALLBACK (dialog_response_handler),
 			  NULL);
 
-	ret = gedit_utils_get_ui_objects (GEDIT_UIDIR "gedit-style-scheme-dialog.ui",
+	file = gedit_dirs_get_ui_file ("gedit-style-scheme-dialog.ui");
+	ret = gedit_utils_get_ui_objects (file,
 		root_objects,
 		&error_widget,
 		
@@ -174,6 +177,7 @@
 		"search_hl_colorbutton", &dlg->priv->search_hl_colorbutton,
 
 		NULL);
+	g_free (file);
 
 	if (!ret)
 	{

Modified: branches/win32/gedit/gedit-print-job.c
==============================================================================
--- branches/win32/gedit/gedit-print-job.c	(original)
+++ branches/win32/gedit/gedit-print-job.c	Mon Dec 22 22:02:09 2008
@@ -42,6 +42,7 @@
 #include "gedit-print-preview.h"
 #include "gedit-marshal.h"
 #include "gedit-utils.h"
+#include "gedit-dirs.h"
 
 
 #define GEDIT_PRINT_JOB_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
@@ -311,13 +312,15 @@
 	gint line_numbers;
 	gboolean can_set;
 	GtkWrapMode wrap_mode;
+	gchar *file;
 	gchar *root_objects[] = {
 		"adjustment1",
 		"contents",
 		NULL
 	};
 
-	ret = gedit_utils_get_ui_objects (GEDIT_UIDIR "gedit-print-preferences.ui",
+	file = gedit_dirs_get_ui_file ("gedit-print-preferences.ui");
+	ret = gedit_utils_get_ui_objects (file,
 					  root_objects,
 					  &error_widget,
 					  "contents", &widget,
@@ -337,6 +340,7 @@
 					  "numbers_fontbutton", &job->priv->numbers_fontbutton,
 					  "restore_button", &job->priv->restore_button,
 					  NULL);
+	g_free (file);
 
 	if (!ret)
 	{

Modified: branches/win32/gedit/gedit-style-scheme-manager.c
==============================================================================
--- branches/win32/gedit/gedit-style-scheme-manager.c	(original)
+++ branches/win32/gedit/gedit-style-scheme-manager.c	Mon Dec 22 22:02:09 2008
@@ -132,7 +132,6 @@
 {
 	GtkSourceStyleScheme *scheme;
 	const gchar *filename;
-	const gchar *home;
 	gchar *dir;
 	gboolean res = FALSE;
 

Modified: branches/win32/gedit/gedit-window.c
==============================================================================
--- branches/win32/gedit/gedit-window.c	(original)
+++ branches/win32/gedit/gedit-window.c	Mon Dec 22 22:02:09 2008
@@ -54,6 +54,7 @@
 #include "gedit-documents-panel.h"
 #include "gedit-plugins-engine.h"
 #include "gedit-enum-types.h"
+#include "gedit-dirs.h"
 
 #define LANGUAGE_NONE (const gchar *)"LangNone"
 #define GEDIT_UIFILE "gedit-ui.xml"
@@ -1313,6 +1314,7 @@
 	GtkRecentFilter *filter;
 	GError *error = NULL;
 	GeditLockdownMask lockdown;
+	gchar *ui_file;
 
 	gedit_debug (DEBUG_WINDOW);
 
@@ -1378,7 +1380,9 @@
 	window->priv->quit_action_group = action_group;
 
 	/* now load the UI definition */
-	gtk_ui_manager_add_ui_from_file (manager, GEDIT_UIDIR GEDIT_UIFILE, &error);
+	ui_file = gedit_dirs_get_ui_file (GEDIT_UIFILE);
+	gtk_ui_manager_add_ui_from_file (manager, ui_file, &error);
+	g_free (ui_file);
 	if (error != NULL)
 	{
 		g_warning ("Could not merge %s: %s", GEDIT_UIFILE, error->message);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]