gtk3-theme-preview-hide.patch 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. diff --git a/Makefile.am b/Makefile.am
  2. index 22f7501..e2a86ba 100644
  3. --- a/Makefile.am
  4. +++ b/Makefile.am
  5. @@ -58,6 +58,7 @@ src_obconf_la_SOURCES = \
  6. src/tree.h
  7. dist_glade_DATA = \
  8. + src/obconf-gtk3.glade \
  9. src/obconf.glade
  10. EXTRA_DIST = \
  11. diff --git a/Makefile.in b/Makefile.in
  12. index c308cc7..dd0a378 100644
  13. --- a/Makefile.in
  14. +++ b/Makefile.in
  15. @@ -480,6 +480,7 @@ src_obconf_la_SOURCES = \
  16. src/tree.h
  17. dist_glade_DATA = \
  18. + src/obconf-gtk3.glade \
  19. src/obconf.glade
  20. EXTRA_DIST = \
  21. diff --git a/src/main.c b/src/main.c
  22. index a39faf1..15c65d8 100644
  23. --- a/src/main.c
  24. +++ b/src/main.c
  25. @@ -171,12 +171,22 @@ extern gboolean plugin_load(LXAppearance* app, GtkBuilder* lxappearance_builder)
  26. builder = gtk_builder_new();
  27. gtk_builder_set_translation_domain(builder, GETTEXT_PACKAGE);
  28. +#if GTK_CHECK_VERSION(3, 0, 0)
  29. + // hide theme preview for GTKv3 (ticket #768)
  30. + g_debug(GLADEDIR"/obconf-gtk3.glade");
  31. + if(!gtk_builder_add_from_file(builder, GLADEDIR"/obconf-gtk3.glade", NULL))
  32. + {
  33. + obconf_error(_("Failed to load the obconf-gtk3.glade interface file. ObConf is probably not installed correctly."), TRUE);
  34. + exit_with_error = TRUE;
  35. + }
  36. +#elif // GTK_CHECK_VERSION(3, 0, 0)
  37. g_debug(GLADEDIR"/obconf.glade");
  38. if(!gtk_builder_add_from_file(builder, GLADEDIR"/obconf.glade", NULL))
  39. {
  40. obconf_error(_("Failed to load the obconf.glade interface file. ObConf is probably not installed correctly."), TRUE);
  41. exit_with_error = TRUE;
  42. }
  43. +#endif // GTK_CHECK_VERSION(3, 0, 0)
  44. gtk_builder_connect_signals(builder, NULL);
  45. gtk_box_pack_start( GTK_BOX(app->wm_page), get_widget("obconf_vbox"), TRUE, TRUE, 0);
  46. gtk_widget_show_all(app->wm_page);
  47. diff --git a/src/obconf-gtk3.glade b/src/obconf-gtk3.glade
  48. new file mode 100644
  49. index 0000000..eb738e4
  50. --- /dev/null
  51. +++ b/src/obconf-gtk3.glade
  52. @@ -0,0 +1,551 @@
  53. +<?xml version="1.0" encoding="UTF-8"?>
  54. +<interface>
  55. + <requires lib="gtk+" version="2.16"/>
  56. + <!-- interface-naming-policy project-wide -->
  57. + <object class="GtkVBox" id="obconf_vbox">
  58. + <property name="visible">True</property>
  59. + <property name="can_focus">False</property>
  60. + <property name="spacing">6</property>
  61. + <child>
  62. + <object class="GtkHBox" id="hbox1">
  63. + <property name="visible">True</property>
  64. + <property name="can_focus">False</property>
  65. + <property name="spacing">12</property>
  66. + <child>
  67. + <object class="GtkNotebook" id="notebook1">
  68. + <property name="visible">True</property>
  69. + <property name="can_focus">True</property>
  70. + <property name="scrollable">True</property>
  71. + <child>
  72. + <object class="GtkVBox" id="vbox1">
  73. + <property name="visible">True</property>
  74. + <property name="can_focus">False</property>
  75. + <property name="border_width">12</property>
  76. + <property name="spacing">6</property>
  77. + <child>
  78. + <object class="GtkVBox" id="vbox3">
  79. + <property name="visible">True</property>
  80. + <property name="can_focus">False</property>
  81. + <property name="spacing">6</property>
  82. + <child>
  83. + <object class="GtkLabel" id="label3">
  84. + <property name="visible">True</property>
  85. + <property name="can_focus">False</property>
  86. + <property name="xalign">0</property>
  87. + <property name="label" translatable="yes">&lt;span weight="bold"&gt;Theme&lt;/span&gt;</property>
  88. + <property name="use_markup">True</property>
  89. + </object>
  90. + <packing>
  91. + <property name="expand">False</property>
  92. + <property name="fill">False</property>
  93. + <property name="position">0</property>
  94. + </packing>
  95. + </child>
  96. + <child>
  97. + <object class="GtkScrolledWindow" id="scrolledwindow1">
  98. + <property name="visible">True</property>
  99. + <property name="can_focus">True</property>
  100. + <property name="hscrollbar_policy">never</property>
  101. + <property name="vscrollbar_policy">automatic</property>
  102. + <property name="shadow_type">in</property>
  103. + <child>
  104. + <object class="GtkTreeView" id="theme_names">
  105. + <property name="visible">True</property>
  106. + <property name="can_focus">True</property>
  107. + <property name="headers_visible">False</property>
  108. + </object>
  109. + </child>
  110. + </object>
  111. + <packing>
  112. + <property name="expand">True</property>
  113. + <property name="fill">True</property>
  114. + <property name="position">1</property>
  115. + </packing>
  116. + </child>
  117. + </object>
  118. + <packing>
  119. + <property name="expand">True</property>
  120. + <property name="fill">True</property>
  121. + <property name="position">0</property>
  122. + </packing>
  123. + </child>
  124. + <child>
  125. + <object class="GtkVBox" id="vbox5">
  126. + <property name="visible">True</property>
  127. + <property name="can_focus">False</property>
  128. + <child>
  129. + <object class="GtkButton" id="install_theme">
  130. + <property name="visible">True</property>
  131. + <property name="can_focus">True</property>
  132. + <property name="receives_default">True</property>
  133. + <property name="use_action_appearance">False</property>
  134. + <signal name="clicked" handler="on_install_theme_clicked" swapped="no"/>
  135. + <child>
  136. + <object class="GtkAlignment" id="alignment3">
  137. + <property name="visible">True</property>
  138. + <property name="can_focus">False</property>
  139. + <property name="xalign">0</property>
  140. + <property name="xscale">0</property>
  141. + <property name="yscale">0</property>
  142. + <child>
  143. + <object class="GtkHBox" id="hbox3">
  144. + <property name="visible">True</property>
  145. + <property name="can_focus">False</property>
  146. + <property name="spacing">2</property>
  147. + <child>
  148. + <object class="GtkImage" id="image3">
  149. + <property name="visible">True</property>
  150. + <property name="can_focus">False</property>
  151. + <property name="stock">gtk-open</property>
  152. + </object>
  153. + <packing>
  154. + <property name="expand">False</property>
  155. + <property name="fill">False</property>
  156. + <property name="position">0</property>
  157. + </packing>
  158. + </child>
  159. + <child>
  160. + <object class="GtkLabel" id="label5">
  161. + <property name="visible">True</property>
  162. + <property name="can_focus">False</property>
  163. + <property name="label" translatable="yes">_Install a new theme...</property>
  164. + <property name="use_underline">True</property>
  165. + </object>
  166. + <packing>
  167. + <property name="expand">False</property>
  168. + <property name="fill">False</property>
  169. + <property name="position">1</property>
  170. + </packing>
  171. + </child>
  172. + </object>
  173. + </child>
  174. + </object>
  175. + </child>
  176. + </object>
  177. + <packing>
  178. + <property name="expand">False</property>
  179. + <property name="fill">False</property>
  180. + <property name="position">0</property>
  181. + </packing>
  182. + </child>
  183. + </object>
  184. + <packing>
  185. + <property name="expand">False</property>
  186. + <property name="fill">True</property>
  187. + <property name="position">1</property>
  188. + </packing>
  189. + </child>
  190. + <child>
  191. + <object class="GtkVBox" id="vbox6">
  192. + <property name="visible">True</property>
  193. + <property name="can_focus">False</property>
  194. + <child>
  195. + <object class="GtkButton" id="theme_archive">
  196. + <property name="visible">True</property>
  197. + <property name="can_focus">True</property>
  198. + <property name="receives_default">True</property>
  199. + <property name="use_action_appearance">False</property>
  200. + <signal name="clicked" handler="on_theme_archive_clicked" swapped="no"/>
  201. + <child>
  202. + <object class="GtkAlignment" id="alignment4">
  203. + <property name="visible">True</property>
  204. + <property name="can_focus">False</property>
  205. + <property name="xalign">0</property>
  206. + <property name="xscale">0</property>
  207. + <property name="yscale">0</property>
  208. + <child>
  209. + <object class="GtkHBox" id="hbox4">
  210. + <property name="visible">True</property>
  211. + <property name="can_focus">False</property>
  212. + <property name="spacing">2</property>
  213. + <child>
  214. + <object class="GtkImage" id="image4">
  215. + <property name="visible">True</property>
  216. + <property name="can_focus">False</property>
  217. + <property name="stock">gtk-save</property>
  218. + </object>
  219. + <packing>
  220. + <property name="expand">False</property>
  221. + <property name="fill">False</property>
  222. + <property name="position">0</property>
  223. + </packing>
  224. + </child>
  225. + <child>
  226. + <object class="GtkLabel" id="label6">
  227. + <property name="visible">True</property>
  228. + <property name="can_focus">False</property>
  229. + <property name="label" translatable="yes">Create a theme _archive (.obt)...</property>
  230. + <property name="use_underline">True</property>
  231. + </object>
  232. + <packing>
  233. + <property name="expand">False</property>
  234. + <property name="fill">False</property>
  235. + <property name="position">1</property>
  236. + </packing>
  237. + </child>
  238. + </object>
  239. + </child>
  240. + </object>
  241. + </child>
  242. + </object>
  243. + <packing>
  244. + <property name="expand">False</property>
  245. + <property name="fill">False</property>
  246. + <property name="position">0</property>
  247. + </packing>
  248. + </child>
  249. + </object>
  250. + <packing>
  251. + <property name="expand">False</property>
  252. + <property name="fill">True</property>
  253. + <property name="position">2</property>
  254. + </packing>
  255. + </child>
  256. + </object>
  257. + </child>
  258. + <child type="tab">
  259. + <object class="GtkLabel" id="label7">
  260. + <property name="visible">True</property>
  261. + <property name="can_focus">False</property>
  262. + <property name="xalign">0</property>
  263. + <property name="label" translatable="yes">Theme</property>
  264. + </object>
  265. + <packing>
  266. + <property name="tab_fill">False</property>
  267. + </packing>
  268. + </child>
  269. + <child>
  270. + <object class="GtkVBox" id="vbox7">
  271. + <property name="visible">True</property>
  272. + <property name="can_focus">False</property>
  273. + <property name="border_width">12</property>
  274. + <property name="spacing">18</property>
  275. + <child>
  276. + <object class="GtkVBox" id="vbox8">
  277. + <property name="visible">True</property>
  278. + <property name="can_focus">False</property>
  279. + <property name="spacing">6</property>
  280. + <child>
  281. + <object class="GtkLabel" id="label15">
  282. + <property name="visible">True</property>
  283. + <property name="can_focus">False</property>
  284. + <property name="xalign">0</property>
  285. + <property name="label" translatable="yes">Font for active window title:</property>
  286. + <property name="use_underline">True</property>
  287. + </object>
  288. + <packing>
  289. + <property name="expand">False</property>
  290. + <property name="fill">True</property>
  291. + <property name="position">0</property>
  292. + </packing>
  293. + </child>
  294. + <child>
  295. + <object class="GtkFontButton" id="font_active">
  296. + <property name="visible">True</property>
  297. + <property name="can_focus">True</property>
  298. + <property name="receives_default">True</property>
  299. + <property name="use_action_appearance">False</property>
  300. + <property name="use_font">True</property>
  301. + <signal name="font-set" handler="on_font_active_font_set" swapped="no"/>
  302. + </object>
  303. + <packing>
  304. + <property name="expand">False</property>
  305. + <property name="fill">True</property>
  306. + <property name="position">1</property>
  307. + </packing>
  308. + </child>
  309. + <child>
  310. + <object class="GtkLabel" id="label16">
  311. + <property name="visible">True</property>
  312. + <property name="can_focus">False</property>
  313. + <property name="xalign">0</property>
  314. + <property name="label" translatable="yes">Font for inactive window title:</property>
  315. + <property name="use_underline">True</property>
  316. + </object>
  317. + <packing>
  318. + <property name="expand">False</property>
  319. + <property name="fill">True</property>
  320. + <property name="position">2</property>
  321. + </packing>
  322. + </child>
  323. + <child>
  324. + <object class="GtkFontButton" id="font_inactive">
  325. + <property name="visible">True</property>
  326. + <property name="can_focus">True</property>
  327. + <property name="receives_default">True</property>
  328. + <property name="use_action_appearance">False</property>
  329. + <property name="use_font">True</property>
  330. + <signal name="font-set" handler="on_font_inactive_font_set" swapped="no"/>
  331. + </object>
  332. + <packing>
  333. + <property name="expand">False</property>
  334. + <property name="fill">True</property>
  335. + <property name="position">3</property>
  336. + </packing>
  337. + </child>
  338. + </object>
  339. + <packing>
  340. + <property name="expand">False</property>
  341. + <property name="fill">True</property>
  342. + <property name="position">0</property>
  343. + </packing>
  344. + </child>
  345. + <child>
  346. + <object class="GtkVBox" id="vbox11">
  347. + <property name="visible">True</property>
  348. + <property name="can_focus">False</property>
  349. + <property name="spacing">6</property>
  350. + <child>
  351. + <object class="GtkHBox" id="hbox6">
  352. + <property name="visible">True</property>
  353. + <property name="can_focus">False</property>
  354. + <property name="spacing">6</property>
  355. + <child>
  356. + <object class="GtkLabel" id="label10">
  357. + <property name="visible">True</property>
  358. + <property name="can_focus">False</property>
  359. + <property name="label" translatable="yes">_Button order:</property>
  360. + <property name="use_underline">True</property>
  361. + </object>
  362. + <packing>
  363. + <property name="expand">False</property>
  364. + <property name="fill">True</property>
  365. + <property name="position">0</property>
  366. + </packing>
  367. + </child>
  368. + <child>
  369. + <object class="GtkEntry" id="title_layout">
  370. + <property name="visible">True</property>
  371. + <property name="can_focus">True</property>
  372. + <property name="invisible_char">●</property>
  373. + <property name="primary_icon_activatable">False</property>
  374. + <property name="secondary_icon_activatable">False</property>
  375. + <property name="primary_icon_sensitive">True</property>
  376. + <property name="secondary_icon_sensitive">True</property>
  377. + <signal name="changed" handler="on_title_layout_changed" swapped="no"/>
  378. + </object>
  379. + <packing>
  380. + <property name="expand">False</property>
  381. + <property name="fill">True</property>
  382. + <property name="position">1</property>
  383. + </packing>
  384. + </child>
  385. + </object>
  386. + <packing>
  387. + <property name="expand">False</property>
  388. + <property name="fill">True</property>
  389. + <property name="position">0</property>
  390. + </packing>
  391. + </child>
  392. + <child>
  393. + <object class="GtkLabel" id="label11">
  394. + <property name="visible">True</property>
  395. + <property name="can_focus">False</property>
  396. + <property name="xalign">0</property>
  397. + <property name="yalign">0</property>
  398. + <property name="label" translatable="yes">N: Window icon
  399. +L: Window label (Title)
  400. +I: Iconify (Minimize)
  401. +M: Maximize
  402. +C: Close
  403. +S: Shade (Roll up)
  404. +D: Omnipresent (On all desktops)</property>
  405. + </object>
  406. + <packing>
  407. + <property name="expand">False</property>
  408. + <property name="fill">True</property>
  409. + <property name="position">1</property>
  410. + </packing>
  411. + </child>
  412. + </object>
  413. + <packing>
  414. + <property name="expand">False</property>
  415. + <property name="fill">True</property>
  416. + <property name="position">1</property>
  417. + </packing>
  418. + </child>
  419. + </object>
  420. + <packing>
  421. + <property name="position">1</property>
  422. + </packing>
  423. + </child>
  424. + <child type="tab">
  425. + <object class="GtkLabel" id="label12">
  426. + <property name="visible">True</property>
  427. + <property name="can_focus">False</property>
  428. + <property name="xalign">0</property>
  429. + <property name="label" translatable="yes">Title Bar</property>
  430. + </object>
  431. + <packing>
  432. + <property name="position">1</property>
  433. + <property name="tab_fill">False</property>
  434. + </packing>
  435. + </child>
  436. + <child>
  437. + <object class="GtkVBox" id="vbox10">
  438. + <property name="visible">True</property>
  439. + <property name="can_focus">False</property>
  440. + <property name="border_width">12</property>
  441. + <child>
  442. + <object class="GtkVBox" id="vbox2">
  443. + <property name="visible">True</property>
  444. + <property name="can_focus">False</property>
  445. + <property name="spacing">6</property>
  446. + <child>
  447. + <object class="GtkLabel" id="label17">
  448. + <property name="visible">True</property>
  449. + <property name="can_focus">False</property>
  450. + <property name="xalign">0</property>
  451. + <property name="label" translatable="yes">Font for menu header:</property>
  452. + <property name="use_underline">True</property>
  453. + </object>
  454. + <packing>
  455. + <property name="expand">False</property>
  456. + <property name="fill">True</property>
  457. + <property name="position">0</property>
  458. + </packing>
  459. + </child>
  460. + <child>
  461. + <object class="GtkFontButton" id="font_menu_header">
  462. + <property name="visible">True</property>
  463. + <property name="can_focus">True</property>
  464. + <property name="receives_default">True</property>
  465. + <property name="use_action_appearance">False</property>
  466. + <property name="use_font">True</property>
  467. + <signal name="font-set" handler="on_font_menu_header_font_set" swapped="no"/>
  468. + </object>
  469. + <packing>
  470. + <property name="expand">True</property>
  471. + <property name="fill">True</property>
  472. + <property name="position">1</property>
  473. + </packing>
  474. + </child>
  475. + <child>
  476. + <object class="GtkLabel" id="label18">
  477. + <property name="visible">True</property>
  478. + <property name="can_focus">False</property>
  479. + <property name="xalign">0</property>
  480. + <property name="label" translatable="yes">Font for menu Item:</property>
  481. + <property name="use_underline">True</property>
  482. + </object>
  483. + <packing>
  484. + <property name="expand">False</property>
  485. + <property name="fill">True</property>
  486. + <property name="position">2</property>
  487. + </packing>
  488. + </child>
  489. + <child>
  490. + <object class="GtkFontButton" id="font_menu_item">
  491. + <property name="visible">True</property>
  492. + <property name="can_focus">True</property>
  493. + <property name="receives_default">True</property>
  494. + <property name="use_action_appearance">False</property>
  495. + <property name="use_font">True</property>
  496. + <signal name="font-set" handler="on_font_menu_item_font_set" swapped="no"/>
  497. + </object>
  498. + <packing>
  499. + <property name="expand">True</property>
  500. + <property name="fill">True</property>
  501. + <property name="position">3</property>
  502. + </packing>
  503. + </child>
  504. + <child>
  505. + <object class="GtkLabel" id="label19">
  506. + <property name="visible">True</property>
  507. + <property name="can_focus">False</property>
  508. + <property name="xalign">0</property>
  509. + <property name="label" translatable="yes">Font for on-screen display:</property>
  510. + <property name="use_underline">True</property>
  511. + </object>
  512. + <packing>
  513. + <property name="expand">True</property>
  514. + <property name="fill">True</property>
  515. + <property name="position">4</property>
  516. + </packing>
  517. + </child>
  518. + <child>
  519. + <object class="GtkFontButton" id="font_active_display">
  520. + <property name="visible">True</property>
  521. + <property name="can_focus">True</property>
  522. + <property name="receives_default">True</property>
  523. + <property name="use_action_appearance">False</property>
  524. + <property name="use_font">True</property>
  525. + <signal name="font-set" handler="on_font_active_display_font_set" swapped="no"/>
  526. + </object>
  527. + <packing>
  528. + <property name="expand">True</property>
  529. + <property name="fill">True</property>
  530. + <property name="position">5</property>
  531. + </packing>
  532. + </child>
  533. + <child>
  534. + <object class="GtkLabel" id="label1">
  535. + <property name="visible">True</property>
  536. + <property name="can_focus">False</property>
  537. + <property name="xalign">0</property>
  538. + <property name="label" translatable="yes">Font for inactive on-screen display:</property>
  539. + <property name="use_underline">True</property>
  540. + </object>
  541. + <packing>
  542. + <property name="expand">True</property>
  543. + <property name="fill">True</property>
  544. + <property name="position">6</property>
  545. + </packing>
  546. + </child>
  547. + <child>
  548. + <object class="GtkFontButton" id="font_inactive_display">
  549. + <property name="visible">True</property>
  550. + <property name="can_focus">True</property>
  551. + <property name="receives_default">True</property>
  552. + <property name="use_action_appearance">False</property>
  553. + <property name="use_font">True</property>
  554. + <signal name="font-set" handler="on_font_inactive_display_font_set" swapped="no"/>
  555. + </object>
  556. + <packing>
  557. + <property name="expand">True</property>
  558. + <property name="fill">True</property>
  559. + <property name="position">7</property>
  560. + </packing>
  561. + </child>
  562. + </object>
  563. + <packing>
  564. + <property name="expand">False</property>
  565. + <property name="fill">True</property>
  566. + <property name="position">0</property>
  567. + </packing>
  568. + </child>
  569. + </object>
  570. + <packing>
  571. + <property name="position">2</property>
  572. + </packing>
  573. + </child>
  574. + <child type="tab">
  575. + <object class="GtkLabel" id="label20">
  576. + <property name="visible">True</property>
  577. + <property name="can_focus">False</property>
  578. + <property name="xalign">0</property>
  579. + <property name="label" translatable="yes">Misc.</property>
  580. + </object>
  581. + <packing>
  582. + <property name="position">2</property>
  583. + <property name="tab_fill">False</property>
  584. + </packing>
  585. + </child>
  586. + </object>
  587. + <packing>
  588. + <property name="expand">True</property>
  589. + <property name="fill">True</property>
  590. + <property name="position">0</property>
  591. + </packing>
  592. + </child>
  593. + <child>
  594. + </child>
  595. + </object>
  596. + <packing>
  597. + <property name="expand">True</property>
  598. + <property name="fill">True</property>
  599. + <property name="position">0</property>
  600. + </packing>
  601. + </child>
  602. + </object>
  603. +</interface>