~ubuntu-branches/ubuntu/wily/easytag/wily

« back to all changes in this revision

Viewing changes to src/gtk2_compat.c

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2013-10-11 17:07:47 UTC
  • mto: (8.1.4 sid)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20131011170747-uqvgtx7uyd046j7z
Tags: upstream-2.1.8
ImportĀ upstreamĀ versionĀ 2.1.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * EasyTAG - Tag editor for MP3 and Ogg Vorbis files
 
3
 * Copyright (C) 2012  David King <amigadave@amigadave.com>
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License as published by
 
7
 * the Free Software Foundation; either version 2 of the License, or
 
8
 * (at your option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
#include "gtk2_compat.h"
 
20
 
 
21
#if !GTK_CHECK_VERSION(3,0,0)
 
22
 
 
23
GtkWidget *gtk_box_new(GtkOrientation orientation,gint padding)
 
24
{
 
25
    if (orientation==GTK_ORIENTATION_HORIZONTAL)
 
26
        return gtk_hbox_new(FALSE,padding);
 
27
    return gtk_vbox_new(FALSE,padding);
 
28
}
 
29
 
 
30
GtkWidget *gtk_button_box_new(GtkOrientation orientation)
 
31
{
 
32
    if (orientation==GTK_ORIENTATION_HORIZONTAL)
 
33
        return gtk_hbutton_box_new();
 
34
    return gtk_vbutton_box_new();
 
35
}
 
36
 
 
37
GtkWidget *gtk_paned_new(GtkOrientation orientation)
 
38
{
 
39
    if (orientation==GTK_ORIENTATION_HORIZONTAL)
 
40
        return gtk_hpaned_new();
 
41
    return gtk_vpaned_new();
 
42
}
 
43
 
 
44
GtkWidget *gtk_separator_new(GtkOrientation orientation)
 
45
{
 
46
    if (orientation==GTK_ORIENTATION_HORIZONTAL)
 
47
        return gtk_hseparator_new();
 
48
    return gtk_vseparator_new();
 
49
}
 
50
 
 
51
#endif /* !GTK_CHECK_VERSION(3,0,0) */