Skip to content

Instantly share code, notes, and snippets.

@shellexy
shellexy / stardict 的 GtkStatusIcon 系统托盘.diff
Created October 16, 2011 13:19
让 stardict 用 GtkStatusIcon 代替 EggTrayIcon 作为系统托盘图标
diff --git a/stardict-3.0.1/src/docklet.cpp b/stardict-3.0.1/src/docklet.cpp
--- a/stardict-3.0.1/src/docklet.cpp
+++ b/stardict-3.0.1/src/docklet.cpp
@@ -24,30 +24,12 @@ DockLet::DockLet(GtkWidget *mainwin, boo
void DockLet::create_docklet()
{
- docklet_ = egg_tray_icon_new("StarDict");
- box_ = gtk_event_box_new();
- if (is_hide_state()) {
@shellexy
shellexy / Ambiance.diff
Created October 15, 2011 12:59
给 11.10 的 Ambiance 主题加上浅黄色
diff --git a/Ambiance/gtk-2.0/gtkrc b/Ambiance/gtk-2.0/gtkrc
--- a/Ambiance/gtk-2.0/gtkrc
+++ b/Ambiance/gtk-2.0/gtkrc
@@ -1,4 +1,4 @@
-gtk-color-scheme = "base_color:#ffffff\nfg_color:#4c4c4c\ntooltip_fg_color:#ffffff\nselected_bg_color:#f07746\nselected_fg_color:#FFFFFF\ntext_color:#3C3C3C\nbg_color:#F2F1F0\ntooltip_bg_color:#000000\nlink_color:#DD4814"
+gtk-color-scheme = "base_color:#f5f5f5f5b5b5\nfg_color:#4c4c4c\ntooltip_fg_color:#ffffff\nselected_bg_color:#f07746\nselected_fg_color:#FFFFFF\ntext_color:#3C3C3C\nbg_color:#F2F1F0\ntooltip_bg_color:#000000\nlink_color:#DD4814"
gtk-icon-sizes = "panel-menu=22,22:gtk-button=16,16"
diff --git a/Ambiance/gtk-3.0/settings.ini b/Ambiance/gtk-3.0/settings.ini
@shellexy
shellexy / gitg-0.2.5-new-ui.diff
Created October 8, 2011 15:20
gitg 界面补丁,将标签栏移至左侧,调整控件边距,让详情栏随 diff 栏滚动以增大可视面积(更新到 gitg 0.2.5
diff --git a/gitg/gitg-window.c b/gitg/gitg-window.c
index fa30e52..6e2b0e1 100644
--- a/gitg/gitg-window.c
+++ b/gitg/gitg-window.c
@@ -297,6 +297,7 @@ add_revision_panel (GitgWindow *window,
label = gitg_revision_panel_get_label (panel);
label_widget = gtk_label_new (label);
+ gtk_label_set_angle (GTK_LABEL(label_widget), 90);
gtk_widget_show (label_widget);
@shellexy
shellexy / altTheme.tcl
Created October 2, 2011 09:52
修改后的 Tk ttk 主题颜色
#
# $Id: altTheme.tcl,v 1.6.2.1 2010/08/26 02:06:10 hobbs Exp $
#
# Ttk widget set: Alternate theme
#
namespace eval ttk::theme::alt {
variable colors
array set colors {
@shellexy
shellexy / 页面导航栏 bookmarklet.js
Created September 30, 2011 12:46
页面导航栏 bookmarklet
javascript: (function() {
NodeList.prototype.forEach = Array.prototype.forEach;
var navId = 'shellexy_html5nav_bar';
if (nav = document.getElementById(navId)) {
document.body.style.marginLeft = document.body.getAttribute('marginLeft');
return nav.parentElement.removeChild(nav);
}
if (!document.styleSheets.length) {
document.body.appendChild(document.createElement('style'));
}
@shellexy
shellexy / 谷歌拼音最大输入长度.diff
Created September 4, 2011 12:22
ibus-googlepinyin 输入词的最大长度由 9 改为 16
diff --git a/include/spellingtrie.h b/include/spellingtrie.h
--- a/include/spellingtrie.h
+++ b/include/spellingtrie.h
@@ -30,8 +30,8 @@ struct SpellingNode {
SpellingNode *first_son;
// The spelling id for each node. If you need more bits to store
// spelling id, please adjust this structure.
- uint16 spelling_idx:11;
- uint16 num_of_son:5;
+ uint16 spelling_idx;