Restore support for Gtk+ 2
This commit is contained in:
parent
cda3d1b70b
commit
72c3318a6f
|
@ -119,8 +119,13 @@ static Pager * _pager_init(PanelAppletHelper * helper, GtkWidget ** widget)
|
|||
}
|
||||
pager->helper = helper;
|
||||
orientation = panel_window_get_orientation(helper->window);
|
||||
#if GTK_CHECK_VERSION(3, 0, 0)
|
||||
pager->box = gtk_box_new(orientation, 0);
|
||||
gtk_box_set_homogeneous(GTK_BOX(pager->box), TRUE);
|
||||
#else
|
||||
pager->box = (orientation == GTK_ORIENTATION_VERTICAL)
|
||||
? gtk_vbox_new(TRUE, 0) : gtk_hbox_new(TRUE, 0);
|
||||
#endif
|
||||
pager->source = g_signal_connect(pager->box, "screen-changed",
|
||||
G_CALLBACK(_pager_on_screen_changed), pager);
|
||||
pager->widgets = NULL;
|
||||
|
|
|
@ -190,7 +190,11 @@ static Task * _task_new(Tasks * tasks, gboolean label, gboolean reorder,
|
|||
task->image = gtk_image_new();
|
||||
task->delete = FALSE;
|
||||
task->reorder = reorder;
|
||||
#if GTK_CHECK_VERSION(3, 0, 0)
|
||||
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
#else
|
||||
hbox = gtk_hbox_new(FALSE, 0);
|
||||
#endif
|
||||
gtk_box_pack_start(GTK_BOX(hbox), task->image, FALSE, TRUE, 0);
|
||||
if(label)
|
||||
{
|
||||
|
@ -312,7 +316,11 @@ static Tasks * _tasks_init(PanelAppletHelper * helper, GtkWidget ** widget)
|
|||
#else
|
||||
tasks->embedded = FALSE;
|
||||
#endif
|
||||
#if GTK_CHECK_VERSION(3, 0, 0)
|
||||
tasks->hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
#else
|
||||
tasks->hbox = gtk_hbox_new(FALSE, 0);
|
||||
#endif
|
||||
gtk_box_set_homogeneous(GTK_BOX(tasks->hbox), TRUE);
|
||||
tasks->source = g_signal_connect(tasks->hbox, "screen-changed",
|
||||
G_CALLBACK(_task_on_screen_changed), tasks);
|
||||
|
|
Loading…
Reference in New Issue
Block a user