summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/panels/panel.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/gui/panels/panel.c b/src/gui/panels/panel.c
index 265fcca..a9e3028 100644
--- a/src/gui/panels/panel.c
+++ b/src/gui/panels/panel.c
@@ -44,10 +44,6 @@
-/* Transition vers GTK-3.x claire */
-#define GTK_IS_HPANED(p) gtk_orientable_get_orientation(GTK_ORIENTABLE(p)) == GTK_ORIENTATION_HORIZONTAL
-
-
/* Support de fond pour les composants. */
static GtkWidget *_support;
static panel_node *_nodes = NULL;
@@ -426,7 +422,7 @@ GtkWidget *init_panels2(GCallback handler, gpointer data)
{
GtkWidget *result; /* Support à retourner */
- result = qck_create_padded_alignment(0, 0, 0, 0);
+ result = gtk_event_box_new();
gtk_widget_show(result);
g_signal_connect(result, "size-allocate", G_CALLBACK(auto_resize_panels), NULL);
@@ -570,9 +566,9 @@ static void switch_panel_node_into_paned(panel_node *current, bool horiz, bool f
current->station = NULL;
if (horiz)
- current->paned = gtk_hpaned_new();
+ current->paned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);
else
- current->paned = gtk_vpaned_new();
+ current->paned = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
gtk_widget_show(current->paned);
@@ -980,7 +976,7 @@ static void get_panel_node_size_request(const panel_node *node, GtkRequisition *
{
gtk_widget_style_get(node->paned, "handle-size", &handle_size, NULL);
- if (GTK_IS_HPANED(node->paned))
+ if (HAS_H_ORIENTATION(node->paned))
{
req->width = handle_size;
req->height = 0;
@@ -1045,7 +1041,7 @@ static void set_panel_node_size_request(const panel_node *node, const GtkRequisi
/* Le premier noeud est le principal... */
if (node->first == main_node)
{
- if (GTK_IS_HPANED(node->paned))
+ if (HAS_H_ORIENTATION(node->paned))
position = (space->width * MAIN_PART_PERCENT) / 100;
else
position = (space->height * MAIN_PART_PERCENT) / 100;
@@ -1058,7 +1054,7 @@ static void set_panel_node_size_request(const panel_node *node, const GtkRequisi
/* Le second noeud est le principal... */
else if (node->second == main_node)
{
- if (GTK_IS_HPANED(node->paned))
+ if (HAS_H_ORIENTATION(node->paned))
position = space->width - (space->width * MAIN_PART_PERCENT) / 100;
else
position = space->height - (space->height * MAIN_PART_PERCENT) / 100;
@@ -1071,7 +1067,7 @@ static void set_panel_node_size_request(const panel_node *node, const GtkRequisi
/* Les éléments sont quelconques... */
else
{
- if (GTK_IS_HPANED(node->paned))
+ if (HAS_H_ORIENTATION(node->paned))
position = space->width / 2;
else
position = space->height / 2;
@@ -1088,14 +1084,14 @@ static void set_panel_node_size_request(const panel_node *node, const GtkRequisi
/* Correctifs éventuels pour les petits composants */
if (node->first == main_node)
{
- if (GTK_IS_HPANED(node->paned))
+ if (HAS_H_ORIENTATION(node->paned))
second_req.width = MAX(second_req.width, (space->width * MIN_PART_PERCENT) / 100);
else
second_req.height = MAX(second_req.height, (space->height * MIN_PART_PERCENT) / 100);
}
else if (node->second == main_node)
{
- if (GTK_IS_HPANED(node->paned))
+ if (HAS_H_ORIENTATION(node->paned))
first_req.width = MAX(first_req.width, (space->width * MIN_PART_PERCENT) / 100);
else
first_req.height = MAX(first_req.height, (space->height * MIN_PART_PERCENT) / 100);
@@ -1104,7 +1100,7 @@ static void set_panel_node_size_request(const panel_node *node, const GtkRequisi
/* Une partie principale arrive en premier */
if (!can_lower && can_upper)
{
- if (GTK_IS_HPANED(node->paned))
+ if (HAS_H_ORIENTATION(node->paned))
position = MAX(position, space->width - second_req.width - handle_size);
else
position = MAX(position, space->height - second_req.height - handle_size);
@@ -1113,7 +1109,7 @@ static void set_panel_node_size_request(const panel_node *node, const GtkRequisi
/* Une partie principale arrive en second */
else if (can_lower && !can_upper)
{
- if (GTK_IS_HPANED(node->paned))
+ if (HAS_H_ORIENTATION(node->paned))
position = MIN(position, second_req.width + handle_size);
else
position = MIN(position, second_req.height + handle_size);