summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2015-09-27 17:07:04 +0200
committermonsta <[email protected]>2015-10-19 16:06:57 +0300
commit5609227c672d94e54edec26e2b4db5f9e1697e17 (patch)
tree58e3dd3e0336c733981d8c4213089f59af5f2931 /src
parentd14fef384a435471860130f7337d5dea5bb824a0 (diff)
downloadcaja-5609227c672d94e54edec26e2b4db5f9e1697e17.tar.bz2
caja-5609227c672d94e54edec26e2b4db5f9e1697e17.tar.xz
GTK3: Replace gtk_{v,h}box new with gtk_box_new
- gtk_{v,h}box usage is deprecated since gtk+-3.2.0
Diffstat (limited to 'src')
-rw-r--r--src/caja-connect-server-dialog.c5
-rw-r--r--src/caja-emblem-sidebar.c4
-rw-r--r--src/caja-image-properties-page.c4
-rw-r--r--src/caja-location-bar.c4
-rw-r--r--src/caja-location-dialog.c4
-rw-r--r--src/caja-navigation-window-pane.c4
-rw-r--r--src/caja-navigation-window.c4
-rw-r--r--src/caja-notebook.c4
-rw-r--r--src/caja-pathbar.c4
-rw-r--r--src/caja-property-browser.c16
-rw-r--r--src/caja-query-editor.c5
-rw-r--r--src/caja-search-bar.c4
-rw-r--r--src/caja-side-pane.c4
-rw-r--r--src/caja-sidebar-title.c4
-rw-r--r--src/caja-spatial-window.c4
-rw-r--r--src/caja-view-as-action.c4
-rw-r--r--src/file-manager/fm-directory-view.c4
-rw-r--r--src/file-manager/fm-ditem-page.c4
-rw-r--r--src/file-manager/fm-list-view.c4
-rw-r--r--src/file-manager/fm-properties-window.c5
20 files changed, 95 insertions, 0 deletions
diff --git a/src/caja-connect-server-dialog.c b/src/caja-connect-server-dialog.c
index 731d6eee..1c78ca7f 100644
--- a/src/caja-connect-server-dialog.c
+++ b/src/caja-connect-server-dialog.c
@@ -40,6 +40,11 @@
#include <libcaja-private/caja-global-preferences.h>
#include <libcaja-private/caja-icon-names.h>
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
+#endif
+
/* TODO:
* - name entry + pre-fill
* - NetworkManager integration
diff --git a/src/caja-emblem-sidebar.c b/src/caja-emblem-sidebar.c
index fe254515..c3740524 100644
--- a/src/caja-emblem-sidebar.c
+++ b/src/caja-emblem-sidebar.c
@@ -64,6 +64,10 @@ struct CajaEmblemSidebarDetails
#define STANDARD_EMBLEM_HEIGHT 52
#define EMBLEM_LABEL_SPACING 2
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#endif
+
static void caja_emblem_sidebar_populate (CajaEmblemSidebar *emblem_sidebar);
static void caja_emblem_sidebar_refresh (CajaEmblemSidebar *emblem_sidebar);
static void caja_emblem_sidebar_iface_init (CajaSidebarIface *iface);
diff --git a/src/caja-image-properties-page.c b/src/caja-image-properties-page.c
index a5b5e0b5..aee7cb4f 100644
--- a/src/caja-image-properties-page.c
+++ b/src/caja-image-properties-page.c
@@ -46,6 +46,10 @@
#define LOAD_BUFFER_SIZE 8192
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
+#endif
+
struct CajaImagePropertiesPageDetails
{
GCancellable *cancellable;
diff --git a/src/caja-location-bar.c b/src/caja-location-bar.c
index a2e27653..ec94c16d 100644
--- a/src/caja-location-bar.c
+++ b/src/caja-location-bar.c
@@ -58,6 +58,10 @@ static const char untranslated_go_to_label[] = N_("Go To:");
#define LOCATION_LABEL _(untranslated_location_label)
#define GO_TO_LABEL _(untranslated_go_to_label)
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#endif
+
struct CajaLocationBarDetails
{
GtkLabel *label;
diff --git a/src/caja-location-dialog.c b/src/caja-location-dialog.c
index b534f210..b6257396 100644
--- a/src/caja-location-dialog.c
+++ b/src/caja-location-dialog.c
@@ -32,6 +32,10 @@
#include "caja-desktop-window.h"
#include <glib/gi18n.h>
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#endif
+
struct _CajaLocationDialogDetails
{
GtkWidget *entry;
diff --git a/src/caja-navigation-window-pane.c b/src/caja-navigation-window-pane.c
index ce079e21..f7363115 100644
--- a/src/caja-navigation-window-pane.c
+++ b/src/caja-navigation-window-pane.c
@@ -45,6 +45,10 @@ G_DEFINE_TYPE (CajaNavigationWindowPane,
CAJA_TYPE_WINDOW_PANE)
#define parent_class caja_navigation_window_pane_parent_class
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
+#endif
static void
real_set_active (CajaWindowPane *pane, gboolean is_active)
diff --git a/src/caja-navigation-window.c b/src/caja-navigation-window.c
index 7eed3c91..c6621afb 100644
--- a/src/caja-navigation-window.c
+++ b/src/caja-navigation-window.c
@@ -108,6 +108,10 @@ static CajaWindowSlot *create_extra_pane (CajaNavigationWindow *window);
G_DEFINE_TYPE (CajaNavigationWindow, caja_navigation_window, CAJA_TYPE_WINDOW)
#define parent_class caja_navigation_window_parent_class
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
+#endif
+
static const struct
{
unsigned int keyval;
diff --git a/src/caja-notebook.c b/src/caja-notebook.c
index 82d9810b..38546e98 100644
--- a/src/caja-notebook.c
+++ b/src/caja-notebook.c
@@ -45,6 +45,10 @@
#define INSANE_NUMBER_OF_URLS 20
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#endif
+
static void caja_notebook_init (CajaNotebook *notebook);
static void caja_notebook_class_init (CajaNotebookClass *klass);
static int caja_notebook_insert_page (GtkNotebook *notebook,
diff --git a/src/caja-pathbar.c b/src/caja-pathbar.c
index 0531a992..0491284a 100644
--- a/src/caja-pathbar.c
+++ b/src/caja-pathbar.c
@@ -39,6 +39,10 @@
#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y)
#endif
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#endif
+
enum
{
PATH_CLICKED,
diff --git a/src/caja-property-browser.c b/src/caja-property-browser.c
index d1d75f8d..afe91842 100644
--- a/src/caja-property-browser.c
+++ b/src/caja-property-browser.c
@@ -182,6 +182,10 @@ static GdkPixbuf * make_color_drag_image (CajaPropertyBro
#define ERASE_OBJECT_NAME "erase.png"
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
+#endif
+
enum
{
PROPERTY_TYPE
@@ -347,7 +351,11 @@ caja_property_browser_init (CajaPropertyBrowser *property_browser)
gtk_widget_show(temp_frame);
gtk_container_add(GTK_CONTAINER(property_browser->details->title_box), temp_frame);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ temp_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
temp_hbox = gtk_hbox_new(FALSE, 0);
+#endif
gtk_widget_show(temp_hbox);
gtk_container_add(GTK_CONTAINER(temp_frame), temp_hbox);
@@ -372,7 +380,11 @@ caja_property_browser_init (CajaPropertyBrowser *property_browser)
temp_box = gtk_event_box_new();
gtk_widget_show(temp_box);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ property_browser->details->bottom_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+#else
property_browser->details->bottom_box = gtk_hbox_new (FALSE, 6);
+#endif
gtk_widget_show (property_browser->details->bottom_box);
gtk_box_pack_end (GTK_BOX (vbox), temp_box, FALSE, FALSE, 0);
@@ -1137,7 +1149,11 @@ caja_emblem_dialog_new (CajaPropertyBrowser *property_browser)
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
widget = gtk_hbox_new (FALSE, 0);
+#endif
gtk_widget_show (widget);
button = gtk_button_new ();
diff --git a/src/caja-query-editor.c b/src/caja-query-editor.c
index 45201831..67556ddc 100644
--- a/src/caja-query-editor.c
+++ b/src/caja-query-editor.c
@@ -34,6 +34,11 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
+#endif
+
typedef enum
{
CAJA_QUERY_EDITOR_ROW_LOCATION,
diff --git a/src/caja-search-bar.c b/src/caja-search-bar.c
index cd1a473b..705f259e 100644
--- a/src/caja-search-bar.c
+++ b/src/caja-search-bar.c
@@ -29,6 +29,10 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#endif
+
struct CajaSearchBarDetails
{
GtkWidget *entry;
diff --git a/src/caja-side-pane.c b/src/caja-side-pane.c
index d30f4918..3ccb289c 100644
--- a/src/caja-side-pane.c
+++ b/src/caja-side-pane.c
@@ -34,6 +34,10 @@
#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y)
#endif
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#endif
+
typedef struct
{
char *title;
diff --git a/src/caja-sidebar-title.c b/src/caja-sidebar-title.c
index d9c780ce..baa9c5e0 100644
--- a/src/caja-sidebar-title.c
+++ b/src/caja-sidebar-title.c
@@ -57,6 +57,10 @@
#define DEFAULT_LIGHT_INFO_COLOR 0xFFFFFF
#define DEFAULT_DARK_INFO_COLOR 0x2A2A2A
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#endif
+
static void caja_sidebar_title_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static void update_icon (CajaSidebarTitle *sidebar_title);
diff --git a/src/caja-spatial-window.c b/src/caja-spatial-window.c
index 4c655f64..4dfe9bfb 100644
--- a/src/caja-spatial-window.c
+++ b/src/caja-spatial-window.c
@@ -75,6 +75,10 @@
#define SPATIAL_ACTION_CLOSE_ALL_FOLDERS "Close All Folders"
#define MENU_PATH_SPATIAL_BOOKMARKS_PLACEHOLDER "/MenuBar/Other Menus/Places/Bookmarks Placeholder"
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#endif
+
struct _CajaSpatialWindowDetails
{
GtkActionGroup *spatial_action_group; /* owned by ui_manager */
diff --git a/src/caja-view-as-action.c b/src/caja-view-as-action.c
index 0c34dd98..9b61bd69 100644
--- a/src/caja-view-as-action.c
+++ b/src/caja-view-as-action.c
@@ -42,6 +42,10 @@ static GObjectClass *parent_class = NULL;
#define CAJA_VIEW_AS_ACTION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), CAJA_TYPE_VIEW_AS_ACTION, CajaViewAsActionPrivate))
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
+#endif
+
struct CajaViewAsActionPrivate
{
CajaNavigationWindow *window;
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index ebf80eb3..157e0f95 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -127,6 +127,10 @@
#define MAX_MENU_LEVELS 5
#define TEMPLATE_LIMIT 30
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#endif
+
enum {
ADD_FILE,
BEGIN_FILE_CHANGES,
diff --git a/src/file-manager/fm-ditem-page.c b/src/file-manager/fm-ditem-page.c
index 0acec773..b08417a2 100644
--- a/src/file-manager/fm-ditem-page.c
+++ b/src/file-manager/fm-ditem-page.c
@@ -36,6 +36,10 @@
#define MAIN_GROUP "Desktop Entry"
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
+#endif
+
typedef struct ItemEntry
{
const char *field;
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index 7e1b5e73..075e8c00 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -61,6 +61,10 @@
#include <libcaja-private/caja-clipboard.h>
#include <libcaja-private/caja-cell-renderer-text-ellipsized.h>
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
+#endif
+
struct FMListViewDetails
{
GtkTreeView *tree_view;
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index 761e727b..dcb9374e 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -81,6 +81,11 @@
#define ROW_PAD 6
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
+#endif
+
static GHashTable *windows;
static GHashTable *pending_lists;