Skip to content

Commit

Permalink
Target Ubuntu 14.04 (gtk 3.10) build
Browse files Browse the repository at this point in the history
  • Loading branch information
subins2000 committed Dec 5, 2021
1 parent 84b30f6 commit 5d65f1e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ ibus-xml:

$(shell SCHEMES=("ml" "ta" "hi" "te" "ka" "bn"); for s in $${SCHEMES[@]}; do echo $s; ./${BIN} -s $$s -lang $$s -xml component/varnam-$$s.xml -prefix ${INSTALL_PREFIX}; done)

ubuntu-14:
CGO_CFLAGS="-w" go build -tags "pango_1_36,gtk_3_10,glib_2_40,cairo_1_13,gdk_pixbuf_2_30,gtk_deprecated" -ldflags "-s -w" -o ${BIN} .
$(MAKE) ibus-xml
$(MAKE) install-script

ubuntu-18:
go build -tags pango_1_42,gtk_3_22 -ldflags "-s -w" -o ${BIN} .
$(MAKE) ibus-xml
Expand Down
22 changes: 9 additions & 13 deletions preferences.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,11 @@ func makeSettingsPage() *gtk.Box {
settingsPage, err := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 6)
checkError(err)

settingsPage.SetMarginStart(12)
settingsPage.SetMarginEnd(12)
// gtk_widget_set_margin_left & right is deprecated since 3.12
// It got removed in 3.98: https://github.com/GNOME/gtk/blob/main/NEWS.pre-4.0#L939
// Our minimum GTK support needed is 3.10 (Ubuntu 14.04)
settingsPage.SetMarginLeft(12)
settingsPage.SetMarginRight(12)
settingsPage.SetMarginBottom(12)

/* Dictionary Match Exact Preference */
Expand Down Expand Up @@ -326,8 +329,8 @@ func makeRLWPage() *gtk.Box {
rlwPage, err := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 6)
checkError(err)

rlwPage.SetMarginStart(12)
rlwPage.SetMarginEnd(12)
rlwPage.SetMarginLeft(12)
rlwPage.SetMarginRight(12)
rlwPage.SetMarginTop(12)
rlwPage.SetMarginBottom(12)

Expand Down Expand Up @@ -419,8 +422,8 @@ func showPrefs() {

notebook.SetScrollable(true)

notebook.SetMarginStart(12)
notebook.SetMarginEnd(12)
notebook.SetMarginLeft(12)
notebook.SetMarginRight(12)
notebook.SetMarginBottom(12)

settingsLabel, err := gtk.LabelNew("Settings")
Expand All @@ -433,13 +436,6 @@ func showPrefs() {

win.Add(notebook)

settingsPage, err := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 6)
checkError(err)

settingsPage.SetMarginStart(12)
settingsPage.SetMarginEnd(12)
settingsPage.SetMarginBottom(12)

// Recursively show all widgets contained in this window.
mainWin.ShowAll()

Expand Down

0 comments on commit 5d65f1e

Please sign in to comment.